Tor  0.4.7.0-alpha-dev
compress_zlib.h
Go to the documentation of this file.
1 /* Copyright (c) 2003, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2021, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /**
7  * \file compress_zlib.h
8  * \brief Header for compress_zlib.c
9  **/
10 
11 #ifndef TOR_COMPRESS_ZLIB_H
12 #define TOR_COMPRESS_ZLIB_H
13 
15 
16 const char *tor_zlib_get_version_str(void);
17 
18 const char *tor_zlib_get_header_version_str(void);
19 
20 /** Internal state for an incremental zlib/gzip compression/decompression. */
22 
25  compress_method_t method,
26  compression_level_t compression_level);
27 
30  char **out, size_t *out_len,
31  const char **in, size_t *in_len,
32  int finish);
33 
35 #define tor_zlib_compress_free(st) \
36  FREE_AND_NULL(tor_zlib_compress_state_t, \
37  tor_zlib_compress_free_, (st))
38 
40 
42 
43 void tor_zlib_init(void);
44 
45 #endif /* !defined(TOR_COMPRESS_ZLIB_H) */
46 
tor_compress_output_t
Definition: compress.h:68
compress_method_t
Definition: compress.h:21
compression_level_t
Definition: compress.h:35
void tor_zlib_compress_free_(tor_zlib_compress_state_t *state)
void tor_zlib_init(void)
const char * tor_zlib_get_header_version_str(void)
tor_zlib_compress_state_t * tor_zlib_compress_new(int compress, compress_method_t method, compression_level_t compression_level)
int tor_zlib_method_supported(void)
Definition: compress_zlib.c:84
size_t tor_zlib_get_total_allocation(void)
size_t tor_zlib_compress_state_size(const tor_zlib_compress_state_t *state)
const char * tor_zlib_get_version_str(void)
Definition: compress_zlib.c:95
tor_compress_output_t tor_zlib_compress_process(tor_zlib_compress_state_t *state, char **out, size_t *out_len, const char **in, size_t *in_len, int finish)