summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/comp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/comp/comp.h')
-rw-r--r--src/lib/libcrypto/comp/comp.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/lib/libcrypto/comp/comp.h b/src/lib/libcrypto/comp/comp.h
new file mode 100644
index 0000000000..93bd9c34c8
--- /dev/null
+++ b/src/lib/libcrypto/comp/comp.h
@@ -0,0 +1,60 @@
1
2#ifndef HEADER_COMP_H
3#define HEADER_COMP_H
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#include <openssl/crypto.h>
10
11typedef struct comp_method_st
12 {
13 int type; /* NID for compression library */
14 const char *name; /* A text string to identify the library */
15 int (*init)();
16 void (*finish)();
17 int (*compress)();
18 int (*expand)();
19 long (*ctrl)();
20 } COMP_METHOD;
21
22typedef struct comp_ctx_st
23 {
24 COMP_METHOD *meth;
25 unsigned long compress_in;
26 unsigned long compress_out;
27 unsigned long expand_in;
28 unsigned long expand_out;
29
30 CRYPTO_EX_DATA ex_data;
31 } COMP_CTX;
32
33
34COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
35void COMP_CTX_free(COMP_CTX *ctx);
36int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
37 unsigned char *in, int ilen);
38int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
39 unsigned char *in, int ilen);
40COMP_METHOD *COMP_rle(void );
41#ifdef ZLIB
42COMP_METHOD *COMP_zlib(void );
43#endif
44
45/* BEGIN ERROR CODES */
46/* The following lines are auto generated by the script mkerr.pl. Any changes
47 * made after this point may be overwritten when the script is next run.
48 */
49
50/* Error codes for the COMP functions. */
51
52/* Function codes. */
53
54/* Reason codes. */
55
56#ifdef __cplusplus
57}
58#endif
59#endif
60