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