comp.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef HEADER_COMP_H
  10. # define HEADER_COMP_H
  11. # include <openssl/opensslconf.h>
  12. # ifndef OPENSSL_NO_COMP
  13. # include <openssl/crypto.h>
  14. # include <openssl/comperr.h>
  15. # ifdef __cplusplus
  16. extern "C" {
  17. # endif
  18. COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
  19. const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
  20. int COMP_CTX_get_type(const COMP_CTX* comp);
  21. int COMP_get_type(const COMP_METHOD *meth);
  22. const char *COMP_get_name(const COMP_METHOD *meth);
  23. void COMP_CTX_free(COMP_CTX *ctx);
  24. int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
  25. unsigned char *in, int ilen);
  26. int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
  27. unsigned char *in, int ilen);
  28. COMP_METHOD *COMP_zlib(void);
  29. #if OPENSSL_API_COMPAT < 0x10100000L
  30. #define COMP_zlib_cleanup() while(0) continue
  31. #endif
  32. # ifdef HEADER_BIO_H
  33. # ifdef ZLIB
  34. const BIO_METHOD *BIO_f_zlib(void);
  35. # endif
  36. # endif
  37. # ifdef __cplusplus
  38. }
  39. # endif
  40. # endif
  41. #endif