SWILIB API (ELKA)    
Loading...
Searching...
No Matches
comp.h
Go to the documentation of this file.
1
2#ifndef HEADER_COMP_H
3#define HEADER_COMP_H
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#include "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 long (*callback_ctrl)();
22
23typedef struct comp_ctx_st
24 {
26 unsigned long compress_in;
27 unsigned long compress_out;
28 unsigned long expand_in;
29 unsigned long expand_out;
30
33
34
37int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
38 unsigned char *in, int ilen);
39int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
40 unsigned char *in, int ilen);
42#ifdef ZLIB
43COMP_METHOD *COMP_zlib(void );
44#endif
45
46/* BEGIN ERROR CODES */
47/* The following lines are auto generated by the script mkerr.pl. Any changes
48 * made after this point may be overwritten when the script is next run.
49 */
50
51/* Error codes for the COMP functions. */
52
53/* Function codes. */
54
55/* Reason codes. */
56
57#ifdef __cplusplus
58}
59#endif
60#endif
61
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, unsigned char *in, int ilen)
unsigned long expand_in
Definition comp.h:28
const char * name
Definition comp.h:14
long(* callback_ctrl)()
Definition comp.h:20
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, unsigned char *in, int ilen)
unsigned long compress_in
Definition comp.h:26
unsigned long compress_out
Definition comp.h:27
void(* finish)()
Definition comp.h:16
COMP_CTX * COMP_CTX_new(COMP_METHOD *meth)
COMP_METHOD * COMP_rle(void)
int(* compress)()
Definition comp.h:17
struct comp_ctx_st COMP_CTX
struct comp_method_st COMP_METHOD
CRYPTO_EX_DATA ex_data
Definition comp.h:31
void COMP_CTX_free(COMP_CTX *ctx)
COMP_METHOD * meth
Definition comp.h:25
unsigned long expand_out
Definition comp.h:29
long(* ctrl)()
Definition comp.h:19
int(* expand)()
Definition comp.h:18
int(* init)()
Definition comp.h:15