torgzip.h 763 B

1234567891011121314151617181920212223242526272829303132
  1. /* Copyright 2003 Roger Dingledine
  2. * Copyright 2004-2005 Roger Dingledine, Nick Mathewson */
  3. /* See LICENSE for licensing information */
  4. /* $Id$ */
  5. /**
  6. * \file torgzip.h
  7. * \brief Headers for torgzip.h
  8. **/
  9. #ifndef __TORGZIP_H
  10. #define __TORGZIP_H
  11. #define TORGZIP_H_ID "$Id$"
  12. typedef enum {
  13. GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3
  14. } compress_method_t;
  15. int
  16. tor_gzip_compress(char **out, size_t *out_len,
  17. const char *in, size_t in_len,
  18. compress_method_t method);
  19. int
  20. tor_gzip_uncompress(char **out, size_t *out_len,
  21. const char *in, size_t in_len,
  22. compress_method_t method);
  23. int is_gzip_supported(void);
  24. int detect_compression_method(const char *in, size_t in_len);
  25. #endif