summaryrefslogtreecommitdiff
path: root/src/common/torgzip.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-05 18:33:52 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-05 18:33:52 +0000
commitf02be02356a6cedcec2b01d5046e5d5cba0797ad (patch)
tree1cb0b87b6d886fd4c5db5e8d14807d31b5a67828 /src/common/torgzip.h
parent03ef2156c93523cb548ea20b41e554b939964c29 (diff)
downloadtor-f02be02356a6cedcec2b01d5046e5d5cba0797ad.tar.gz
tor-f02be02356a6cedcec2b01d5046e5d5cba0797ad.zip
r11639@catbus: nickm | 2007-02-05 13:33:38 -0500
Add documentation to src/common/*.h; improve documentation for SMARTLIST_FOREACH; remove never-used options and corresponding tests from tor_strpartition. svn:r9483
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r--src/common/torgzip.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/torgzip.h b/src/common/torgzip.h
index f8e15d75c0..51e8709303 100644
--- a/src/common/torgzip.h
+++ b/src/common/torgzip.h
@@ -12,7 +12,10 @@
#define __TORGZIP_H
#define TORGZIP_H_ID "$Id$"
-/** DOCDOC */
+/** Enumeration of what kind of compression to use. Only ZLIB_METHOD is
+ * guaranteed to be supported by the compress/uncompress functions here;
+ * GZIP_METHOD may be supported if we built against zlib version 1.2 or later
+ * and is_gzip_supported() returns true. */
typedef enum {
NO_METHOD=0, GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3
} compress_method_t;
@@ -32,10 +35,11 @@ int is_gzip_supported(void);
compress_method_t detect_compression_method(const char *in, size_t in_len);
-/** DOCDOC */
+/** Return values from tor_zlib_process; see that function's documentation for
+ * details. */
typedef enum {
TOR_ZLIB_OK, TOR_ZLIB_DONE, TOR_ZLIB_BUF_FULL, TOR_ZLIB_ERR
-} tor_zlib_output_t;
+} 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);