comp.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (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 OPENSSL_COMP_H
  10. # define OPENSSL_COMP_H
  11. # pragma once
  12. # include <openssl/macros.h>
  13. # ifndef OPENSSL_NO_DEPRECATED_3_0
  14. # define HEADER_COMP_H
  15. # endif
  16. # include <openssl/opensslconf.h>
  17. # ifndef OPENSSL_NO_COMP
  18. # include <openssl/crypto.h>
  19. # include <openssl/comperr.h>
  20. # ifdef __cplusplus
  21. extern "C" {
  22. # endif
  23. COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
  24. const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
  25. int COMP_CTX_get_type(const COMP_CTX* comp);
  26. int COMP_get_type(const COMP_METHOD *meth);
  27. const char *COMP_get_name(const COMP_METHOD *meth);
  28. void COMP_CTX_free(COMP_CTX *ctx);
  29. int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
  30. unsigned char *in, int ilen);
  31. int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
  32. unsigned char *in, int ilen);
  33. COMP_METHOD *COMP_zlib(void);
  34. #ifndef OPENSSL_NO_DEPRECATED_1_1_0
  35. # define COMP_zlib_cleanup() while(0) continue
  36. #endif
  37. # ifdef OPENSSL_BIO_H
  38. # ifdef ZLIB
  39. const BIO_METHOD *BIO_f_zlib(void);
  40. # endif
  41. # endif
  42. # ifdef __cplusplus
  43. }
  44. # endif
  45. # endif
  46. #endif