summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
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));
+}
+