* tar xzf utvpn-src-unix-v101-7101-public-2010.06.27.tar.gz
[lab.git] / utvpn / utvpn-unix-v101-7101-public / src / Mayaqua / openssl / comp.h
1 \r
2 #ifndef HEADER_COMP_H\r
3 #define HEADER_COMP_H\r
4 \r
5 #include <openssl/crypto.h>\r
6 \r
7 #ifdef  __cplusplus\r
8 extern "C" {\r
9 #endif\r
10 \r
11 typedef struct comp_ctx_st COMP_CTX;\r
12 \r
13 typedef struct comp_method_st\r
14         {\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
26         long (*ctrl)(void);\r
27         long (*callback_ctrl)(void);\r
28         } COMP_METHOD;\r
29 \r
30 struct comp_ctx_st\r
31         {\r
32         COMP_METHOD *meth;\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
37 \r
38         CRYPTO_EX_DATA  ex_data;\r
39         };\r
40 \r
41 \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
50 \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
54  */\r
55 void ERR_load_COMP_strings(void);\r
56 \r
57 /* Error codes for the COMP functions. */\r
58 \r
59 /* Function codes. */\r
60 \r
61 /* Reason codes. */\r
62 \r
63 #ifdef  __cplusplus\r
64 }\r
65 #endif\r
66 #endif\r