aboutsummaryrefslogtreecommitdiff
path: root/lib/fstream/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstream/internal.h')
-rw-r--r--lib/fstream/internal.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/fstream/internal.h b/lib/fstream/internal.h
index e8b0c07..ae6a29a 100644
--- a/lib/fstream/internal.h
+++ b/lib/fstream/internal.h
@@ -22,4 +22,31 @@
#define BUFSZ (262144)
+typedef struct ostream_comp_t {
+ ostream_t base;
+
+ ostream_t *wrapped;
+
+ size_t inbuf_used;
+
+ sqfs_u8 inbuf[BUFSZ];
+ sqfs_u8 outbuf[BUFSZ];
+
+ int (*flush_inbuf)(struct ostream_comp_t *ostrm, bool finish);
+
+ void (*cleanup)(struct ostream_comp_t *ostrm);
+} ostream_comp_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SQFS_INTERNAL ostream_comp_t *ostream_gzip_create(const char *filename);
+
+SQFS_INTERNAL ostream_comp_t *ostream_xz_create(const char *filename);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* INTERNAL_H */