aboutsummaryrefslogtreecommitdiff
path: root/src/common/torgzip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r--src/common/torgzip.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/torgzip.h b/src/common/torgzip.h
index 134ef03268..153ab4992d 100644
--- a/src/common/torgzip.h
+++ b/src/common/torgzip.h
@@ -31,5 +31,17 @@ int is_gzip_supported(void);
int detect_compression_method(const char *in, size_t in_len);
+typedef enum {
+ TOR_ZLIB_OK, TOR_ZLIB_DONE, TOR_ZLIB_BUF_FULL, TOR_ZLIB_ERR
+} tor_zlib_output_t;
+typedef struct tor_zlib_state_t tor_zlib_state_t;
+tor_zlib_state_t *tor_zlib_new(int compress, compress_method_t method);
+
+tor_zlib_output_t tor_zlib_process(tor_zlib_state_t *state,
+ char **out, size_t *out_len,
+ const char **in, size_t *in_len,
+ int finish);
+void tor_zlib_free(tor_zlib_state_t *state);
+
#endif