From a96572fba84573e81f6b363f1aee0243c7829729 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 27 Nov 2008 21:06:45 +0200 Subject: db: compressed index file --- src/io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/io.c') 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)); +} + -- cgit v1.2.3-60-g2f50