diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-09-02 18:22:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-09-02 18:22:51 +0000 |
commit | 3590eb535a539911cf899511f6f3f21c745c65b8 (patch) | |
tree | 0c89e49c7e50339b38b8418e568d2033f4316f72 /src/common/torgzip.h | |
parent | dccc4b74158f121d0f25a1328ed3da85203710f5 (diff) | |
download | tor-3590eb535a539911cf899511f6f3f21c745c65b8.tar.gz tor-3590eb535a539911cf899511f6f3f21c745c65b8.zip |
Add basic wrappers for zlib/gzip
svn:r2324
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r-- | src/common/torgzip.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common/torgzip.h b/src/common/torgzip.h new file mode 100644 index 0000000000..61bb6adbcf --- /dev/null +++ b/src/common/torgzip.h @@ -0,0 +1,26 @@ +/* Copyright 2003 Roger Dingledine */ +/* See LICENSE for licensing information */ +/* $Id$ */ + +/** + * \file torgzip.h + * \brief Headers for torgzip.h + **/ + +#ifndef __TORGZIP_H +#define __TORGZIP_H + +typedef enum { GZIP_METHOD, ZLIB_METHOD } compress_method_t; + +int +tor_gzip_compress(char **out, size_t *out_len, + const char *in, size_t in_len, + compress_method_t method); +int +tor_gzip_uncompress(char **out, size_t *out_len, + const char *in, size_t in_len, + compress_method_t method); + +int is_gzip_supported(void); + +#endif |