* 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
diff --git a/utvpn/utvpn-unix-v101-7101-public/src/Mayaqua/openssl/comp.h b/utvpn/utvpn-unix-v101-7101-public/src/Mayaqua/openssl/comp.h
new file mode 100644 (file)
index 0000000..9e77ebc
--- /dev/null
@@ -0,0 +1,66 @@
+\r
+#ifndef HEADER_COMP_H\r
+#define HEADER_COMP_H\r
+\r
+#include <openssl/crypto.h>\r
+\r
+#ifdef  __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+typedef struct comp_ctx_st COMP_CTX;\r
+\r
+typedef struct comp_method_st\r
+       {\r
+       int type;               /* NID for compression library */\r
+       const char *name;       /* A text string to identify the library */\r
+       int (*init)(COMP_CTX *ctx);\r
+       void (*finish)(COMP_CTX *ctx);\r
+       int (*compress)(COMP_CTX *ctx,\r
+                       unsigned char *out, unsigned int olen,\r
+                       unsigned char *in, unsigned int ilen);\r
+       int (*expand)(COMP_CTX *ctx,\r
+                     unsigned char *out, unsigned int olen,\r
+                     unsigned char *in, unsigned int ilen);\r
+       /* The following two do NOTHING, but are kept for backward compatibility */\r
+       long (*ctrl)(void);\r
+       long (*callback_ctrl)(void);\r
+       } COMP_METHOD;\r
+\r
+struct comp_ctx_st\r
+       {\r
+       COMP_METHOD *meth;\r
+       unsigned long compress_in;\r
+       unsigned long compress_out;\r
+       unsigned long expand_in;\r
+       unsigned long expand_out;\r
+\r
+       CRYPTO_EX_DATA  ex_data;\r
+       };\r
+\r
+\r
+COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);\r
+void COMP_CTX_free(COMP_CTX *ctx);\r
+int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,\r
+       unsigned char *in, int ilen);\r
+int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,\r
+       unsigned char *in, int ilen);\r
+COMP_METHOD *COMP_rle(void );\r
+COMP_METHOD *COMP_zlib(void );\r
+\r
+/* BEGIN ERROR CODES */\r
+/* The following lines are auto generated by the script mkerr.pl. Any changes\r
+ * made after this point may be overwritten when the script is next run.\r
+ */\r
+void ERR_load_COMP_strings(void);\r
+\r
+/* Error codes for the COMP functions. */\r
+\r
+/* Function codes. */\r
+\r
+/* Reason codes. */\r
+\r
+#ifdef  __cplusplus\r
+}\r
+#endif\r
+#endif\r