torgzip.h 803 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright 2003 Roger Dingledine
  2. * Copyright 2004-2006 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 complete_only);
  24. int is_gzip_supported(void);
  25. int detect_compression_method(const char *in, size_t in_len);
  26. #endif