summaryrefslogtreecommitdiff
path: root/lib/fstream/internal.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-14 14:59:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-16 09:34:35 +0200
commitc9f5cfd3df2706da940a39d6d816ad084ba80fbd (patch)
tree3aac86238ce840c3c25ff89892f6109c081f60d8 /lib/fstream/internal.h
parentf757737060d4daebb24a32e90d912661428708a8 (diff)
Implement istream decompression support
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstream/internal.h')
-rw-r--r--lib/fstream/internal.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/fstream/internal.h b/lib/fstream/internal.h
index ae6a29a..160a523 100644
--- a/lib/fstream/internal.h
+++ b/lib/fstream/internal.h
@@ -37,6 +37,18 @@ typedef struct ostream_comp_t {
void (*cleanup)(struct ostream_comp_t *ostrm);
} ostream_comp_t;
+typedef struct istream_comp_t {
+ istream_t base;
+
+ istream_t *wrapped;
+
+ sqfs_u8 uncompressed[BUFSZ];
+
+ bool eof;
+
+ void (*cleanup)(struct istream_comp_t *strm);
+} istream_comp_t;
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -45,6 +57,10 @@ SQFS_INTERNAL ostream_comp_t *ostream_gzip_create(const char *filename);
SQFS_INTERNAL ostream_comp_t *ostream_xz_create(const char *filename);
+SQFS_INTERNAL istream_comp_t *istream_gzip_create(const char *filename);
+
+SQFS_INTERNAL istream_comp_t *istream_xz_create(const char *filename);
+
#ifdef __cplusplus
}
#endif