2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 #if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
30 #include <openssl/crypto.h>
38 typedef struct comp_ctx_st COMP_CTX;
40 typedef struct comp_method_st
42 int type; /* NID for compression library */
43 const char *name; /* A text string to identify the library */
44 int (*init)(COMP_CTX *ctx);
45 void (*finish)(COMP_CTX *ctx);
46 int (*compress)(COMP_CTX *ctx,
47 unsigned char *out, unsigned int olen,
48 unsigned char *in, unsigned int ilen);
49 int (*expand)(COMP_CTX *ctx,
50 unsigned char *out, unsigned int olen,
51 unsigned char *in, unsigned int ilen);
52 /* The following two do NOTHING, but are kept for backward compatibility */
54 long (*callback_ctrl)(void);
60 unsigned long compress_in;
61 unsigned long compress_out;
62 unsigned long expand_in;
63 unsigned long expand_out;
65 CRYPTO_EX_DATA ex_data;
69 IMPORT_C COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
70 IMPORT_C void COMP_CTX_free(COMP_CTX *ctx);
71 IMPORT_C int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
72 unsigned char *in, int ilen);
73 IMPORT_C int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
74 unsigned char *in, int ilen);
75 IMPORT_C COMP_METHOD *COMP_rle(void );
76 IMPORT_C COMP_METHOD *COMP_zlib(void );
78 /* BEGIN ERROR CODES */
79 /* The following lines are auto generated by the script mkerr.pl. Any changes
80 * made after this point may be overwritten when the script is next run.
82 IMPORT_C void ERR_load_COMP_strings(void);
84 /* Error codes for the COMP functions. */