summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-11-27 21:06:45 +0200
committerTimo Teras <timo.teras@iki.fi>2008-11-27 21:06:45 +0200
commita96572fba84573e81f6b363f1aee0243c7829729 (patch)
treee43c0e8729b0ab3c5625b9a96fca35839974b65c /src/io.c
parentf0609951b9fd2938c0f30853e0aa6b08b8698a88 (diff)
downloadapk-tools-a96572fba84573e81f6b363f1aee0243c7829729.tar.gz
apk-tools-a96572fba84573e81f6b363f1aee0243c7829729.tar.bz2
apk-tools-a96572fba84573e81f6b363f1aee0243c7829729.tar.xz
apk-tools-a96572fba84573e81f6b363f1aee0243c7829729.zip
db: compressed index file
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 84b556b..e4dfd33 100644
--- a/src/io.c
+++ b/src/io.c
@@ -362,3 +362,15 @@ int apk_file_get_info(const char *filename, struct apk_file_info *fi)
return 0;
}
+
+struct apk_istream *apk_istream_from_file_gz(const char *file)
+{
+ int fd;
+
+ fd = open(file, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+
+ return apk_gunzip_bstream(apk_bstream_from_fd(fd));
+}
+