zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
example.c File Reference
#include "zlib.h"
#include <stdio.h>

Go to the source code of this file.

Macros

#define CHECK_ERR(err, msg)
 
#define TESTFILE   "foo.gz"
 

Functions

int main (int argc, argv)
 
void test_compress OF ((Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen))
 
void test_gzio OF ((const char *fname, Byte *uncompr, uLong uncomprLen))
 
void test_deflate OF ((Byte *compr, uLong comprLen))
 
void test_flush OF ((Byte *compr, uLong *comprLen))
 
int main OF ((int argc, char *argv[]))
 
void test_compress (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_deflate (Byte *compr, uLong comprLen)
 
void test_dict_deflate (Byte *compr, uLong comprLen)
 
void test_dict_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_flush (Byte *compr, uLong *comprLen)
 
void test_gzio (char *fname, Byte *uncompr, uLong uncomprLen) const
 
void test_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_large_deflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_large_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_sync (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 

Variables

uLong dictId
 
const char dictionary [] = "hello"
 
const char hello [] = "hello, hello!"
 

Macro Definition Documentation

#define CHECK_ERR (   err,
  msg 
)
Value:
{ \
if (err != Z_OK) { \
fprintf(stderr, "%s error: %d\n", msg, err); \
exit(1); \
} \
}
if(!yyg->yy_init)
#define Z_OK
Definition: zlib.h:132

Definition at line 22 of file example.c.

Referenced by test_compress(), test_deflate(), test_dict_deflate(), test_dict_inflate(), test_flush(), test_inflate(), test_large_deflate(), test_large_inflate(), and test_sync().

#define TESTFILE   "foo.gz"

Definition at line 19 of file example.c.

Referenced by main().

Function Documentation

void test_compress OF ( (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)  )
void test_gzio OF ( (const char *fname, Byte *uncompr, uLong uncomprLen)  )
void test_deflate OF ( (Byte *compr, uLong comprLen)  )
void test_flush OF ( (Byte *compr, uLong *comprLen)  )
int main OF ( (int argc, char *argv[])  )
void test_compress ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 59 of file example.c.

References CHECK_ERR, compress(), hello, and uncompress().

Referenced by main().

void test_gzio ( char *  fname,
Byte uncompr,
uLong  uncomprLen 
) const

Variable Documentation

uLong dictId

Definition at line 35 of file example.c.

Referenced by test_dict_deflate(), and test_dict_inflate().

const char dictionary[] = "hello"

Definition at line 34 of file example.c.

Referenced by test_dict_deflate(), and test_dict_inflate().

const char hello[] = "hello, hello!"