comp.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. COMP_METHOD *COMP_zlib_oneshot(void);
  35. COMP_METHOD *COMP_brotli(void);
  36. COMP_METHOD *COMP_brotli_oneshot(void);
  37. COMP_METHOD *COMP_zstd(void);
  38. COMP_METHOD *COMP_zstd_oneshot(void);
  39. #ifndef OPENSSL_NO_DEPRECATED_1_1_0
  40. # define COMP_zlib_cleanup() while(0) continue
  41. #endif
  42. # ifdef OPENSSL_BIO_H
  43. const BIO_METHOD *BIO_f_zlib(void);
  44. const BIO_METHOD *BIO_f_brotli(void);
  45. const BIO_METHOD *BIO_f_zstd(void);
  46. # endif
  47. # ifdef __cplusplus
  48. }
  49. # endif
  50. # endif
  51. #endif