2 #ifndef HEADER_COMP_H
\r
3 #define HEADER_COMP_H
\r
5 #include <openssl/crypto.h>
\r
11 typedef struct comp_ctx_st COMP_CTX;
\r
13 typedef struct comp_method_st
\r
15 int type; /* NID for compression library */
\r
16 const char *name; /* A text string to identify the library */
\r
17 int (*init)(COMP_CTX *ctx);
\r
18 void (*finish)(COMP_CTX *ctx);
\r
19 int (*compress)(COMP_CTX *ctx,
\r
20 unsigned char *out, unsigned int olen,
\r
21 unsigned char *in, unsigned int ilen);
\r
22 int (*expand)(COMP_CTX *ctx,
\r
23 unsigned char *out, unsigned int olen,
\r
24 unsigned char *in, unsigned int ilen);
\r
25 /* The following two do NOTHING, but are kept for backward compatibility */
\r
27 long (*callback_ctrl)(void);
\r
33 unsigned long compress_in;
\r
34 unsigned long compress_out;
\r
35 unsigned long expand_in;
\r
36 unsigned long expand_out;
\r
38 CRYPTO_EX_DATA ex_data;
\r
42 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
\r
43 void COMP_CTX_free(COMP_CTX *ctx);
\r
44 int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
\r
45 unsigned char *in, int ilen);
\r
46 int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
\r
47 unsigned char *in, int ilen);
\r
48 COMP_METHOD *COMP_rle(void );
\r
49 COMP_METHOD *COMP_zlib(void );
\r
51 /* BEGIN ERROR CODES */
\r
52 /* The following lines are auto generated by the script mkerr.pl. Any changes
\r
53 * made after this point may be overwritten when the script is next run.
\r
55 void ERR_load_COMP_strings(void);
\r
57 /* Error codes for the COMP functions. */
\r
59 /* Function codes. */
\r