diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-06-18 07:24:29 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-06-18 07:24:29 +0000 |
commit | 630e9cd5105e089896b0034403dec8c0d71137a0 (patch) | |
tree | d0c9ee27349341cf78ab36611ec69911df8a6ab8 /src/common/torgzip.h | |
parent | af8096815e126dcab718b2eef6e500ed2aa83912 (diff) | |
download | tor-630e9cd5105e089896b0034403dec8c0d71137a0.tar.gz tor-630e9cd5105e089896b0034403dec8c0d71137a0.zip |
Add some incremental encryption wrappers to torgzip code
svn:r6636
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r-- | src/common/torgzip.h | 12 |
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 |