2005-04-01 22:15:56 +02:00
|
|
|
/* Copyright 2003 Roger Dingledine
|
2006-02-09 06:46:49 +01:00
|
|
|
* Copyright 2004-2006 Roger Dingledine, Nick Mathewson */
|
2004-09-02 20:22:51 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file torgzip.h
|
|
|
|
* \brief Headers for torgzip.h
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __TORGZIP_H
|
|
|
|
#define __TORGZIP_H
|
2004-11-29 23:25:31 +01:00
|
|
|
#define TORGZIP_H_ID "$Id$"
|
2004-09-02 20:22:51 +02:00
|
|
|
|
2005-01-19 23:40:33 +01:00
|
|
|
typedef enum {
|
|
|
|
GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3
|
|
|
|
} compress_method_t;
|
2004-09-02 20:22:51 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
tor_gzip_compress(char **out, size_t *out_len,
|
2004-10-14 06:31:16 +02:00
|
|
|
const char *in, size_t in_len,
|
|
|
|
compress_method_t method);
|
2004-09-02 20:22:51 +02:00
|
|
|
int
|
|
|
|
tor_gzip_uncompress(char **out, size_t *out_len,
|
2004-10-14 06:31:16 +02:00
|
|
|
const char *in, size_t in_len,
|
2005-10-14 00:48:09 +02:00
|
|
|
compress_method_t method,
|
2006-02-13 00:44:02 +01:00
|
|
|
int complete_only,
|
|
|
|
int protocol_warn_level);
|
2004-09-02 20:22:51 +02:00
|
|
|
|
|
|
|
int is_gzip_supported(void);
|
|
|
|
|
2005-01-19 23:40:33 +01:00
|
|
|
int detect_compression_method(const char *in, size_t in_len);
|
|
|
|
|
2004-09-02 20:22:51 +02:00
|
|
|
#endif
|
2005-06-09 21:03:31 +02:00
|
|
|
|