diff options
author | Timo Teras <timo.teras@iki.fi> | 2008-11-27 21:06:45 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2008-11-27 21:06:45 +0200 |
commit | a96572fba84573e81f6b363f1aee0243c7829729 (patch) | |
tree | e43c0e8729b0ab3c5625b9a96fca35839974b65c /src/io.c | |
parent | f0609951b9fd2938c0f30853e0aa6b08b8698a88 (diff) | |
download | apk-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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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)); +} + |