comp.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright 2015-2016 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. # ifdef __cplusplus
  15. extern "C" {
  16. # endif
  17. COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
  18. const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
  19. int COMP_CTX_get_type(const COMP_CTX* comp);
  20. int COMP_get_type(const COMP_METHOD *meth);
  21. const char *COMP_get_name(const COMP_METHOD *meth);
  22. void COMP_CTX_free(COMP_CTX *ctx);
  23. int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
  24. unsigned char *in, int ilen);
  25. int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
  26. unsigned char *in, int ilen);
  27. COMP_METHOD *COMP_zlib(void);
  28. #if OPENSSL_API_COMPAT < 0x10100000L
  29. #define COMP_zlib_cleanup() while(0) continue
  30. #endif
  31. # ifdef HEADER_BIO_H
  32. # ifdef ZLIB
  33. const BIO_METHOD *BIO_f_zlib(void);
  34. # endif
  35. # endif
  36. /* BEGIN ERROR CODES */
  37. /*
  38. * The following lines are auto generated by the script mkerr.pl. Any changes
  39. * made after this point may be overwritten when the script is next run.
  40. */
  41. int ERR_load_COMP_strings(void);
  42. /* Error codes for the COMP functions. */
  43. /* Function codes. */
  44. # define COMP_F_BIO_ZLIB_FLUSH 99
  45. # define COMP_F_BIO_ZLIB_NEW 100
  46. # define COMP_F_BIO_ZLIB_READ 101
  47. # define COMP_F_BIO_ZLIB_WRITE 102
  48. /* Reason codes. */
  49. # define COMP_R_ZLIB_DEFLATE_ERROR 99
  50. # define COMP_R_ZLIB_INFLATE_ERROR 100
  51. # define COMP_R_ZLIB_NOT_SUPPORTED 101
  52. # ifdef __cplusplus
  53. }
  54. # endif
  55. # endif
  56. #endif