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