Forward port changelog
[tor.git] / src / common / torgzip.h
blobd6e070f8ece18051f18066bee9d981d1a54c8ac9
1 /* Copyright 2003 Roger Dingledine */
2 /* See LICENSE for licensing information */
3 /* $Id$ */
5 /**
6 * \file torgzip.h
7 * \brief Headers for torgzip.h
8 **/
10 #ifndef __TORGZIP_H
11 #define __TORGZIP_H
12 #define TORGZIP_H_ID "$Id$"
14 typedef enum {
15 GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3
16 } compress_method_t;
18 int
19 tor_gzip_compress(char **out, size_t *out_len,
20 const char *in, size_t in_len,
21 compress_method_t method);
22 int
23 tor_gzip_uncompress(char **out, size_t *out_len,
24 const char *in, size_t in_len,
25 compress_method_t method);
27 int is_gzip_supported(void);
29 int detect_compression_method(const char *in, size_t in_len);
31 #endif