aboutsummaryrefslogtreecommitdiff
path: root/src/base/flate/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/flate/internal.h')
-rw-r--r--src/base/flate/internal.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/base/flate/internal.h b/src/base/flate/internal.h
new file mode 100644
index 0000000..794c7c2
--- /dev/null
+++ b/src/base/flate/internal.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <u.h>
+#include <base.h>
+
+#include <zlib.h>
+
+typedef struct buffer
+{
+ union {
+ struct z_stream_s;
+ z_stream z;
+ };
+
+ ubyte buf[4098];
+} buffer;
+
+typedef struct flate·Reader
+{
+ io·Reader rdr;
+ void* impl;
+
+ union {
+ struct buffer;
+ buffer b;
+ };
+} flate·Reader;
+
+typedef struct flate·Writer
+{
+ io·Writer wtr;
+ void* impl;
+
+ union {
+ struct buffer;
+ buffer b;
+ };
+} flate·Writer;
+