Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions | Variables
example.c File Reference
#include "zlib.h"
#include <stdio.h>

Go to the source code of this file.

Macros

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

Functions

void test_deflate OF ((Byte *compr, uLong comprLen))
 
void test_inflate OF ((Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen))
 
void test_flush OF ((Byte *compr, uLong *comprLen))
 
int main OF ((int argc, char *argv[]))
 
void test_gzio OF ((const char *fname, Byte *uncompr, uLong uncomprLen))
 
void test_compress (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_gzio (char *fname, Byte *uncompr, uLong uncomprLen) const
 
void test_deflate (Byte *compr, uLong comprLen)
 
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_flush (Byte *compr, uLong *comprLen)
 
void test_sync (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
void test_dict_deflate (Byte *compr, uLong comprLen)
 
void test_dict_inflate (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)
 
int main (int argc, argv)
 

Variables

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

Macro Definition Documentation

◆ CHECK_ERR

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

Definition at line 22 of file example.c.

Referenced by test_compress().

◆ TESTFILE

#define TESTFILE   "foo.gz"

Definition at line 19 of file example.c.

Referenced by main().

Function Documentation

◆ main()

int main ( int  argc,
argv   
)

◆ OF() [1/5]

void test_deflate OF ( (Byte *compr, uLong comprLen)  )

◆ OF() [2/5]

void test_inflate OF ( (Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen)  )

◆ OF() [3/5]

void test_flush OF ( (Byte *compr, uLong *comprLen)  )

◆ OF() [4/5]

int main OF ( (int argc, char *argv[])  )

◆ OF() [5/5]

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

◆ test_compress()

void test_compress ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 88 of file example.c.

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

Referenced by main().

◆ test_deflate()

void test_deflate ( Byte compr,
uLong  comprLen 
)

Definition at line 200 of file example.c.

References hello, and z_stream_s::zalloc.

Referenced by main().

◆ test_dict_deflate()

void test_dict_deflate ( Byte compr,
uLong  comprLen 
)

Definition at line 457 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

◆ test_dict_inflate()

void test_dict_inflate ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 494 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

◆ test_flush()

void test_flush ( Byte compr,
uLong comprLen 
)

Definition at line 375 of file example.c.

References hello, and z_stream_s::zalloc.

Referenced by main().

◆ test_gzio()

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

◆ test_inflate()

void test_inflate ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 238 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

◆ test_large_deflate()

void test_large_deflate ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 279 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

◆ test_large_inflate()

void test_large_inflate ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 334 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

◆ test_sync()

void test_sync ( Byte compr,
uLong  comprLen,
Byte uncompr,
uLong  uncomprLen 
)

Definition at line 413 of file example.c.

References z_stream_s::zalloc.

Referenced by main().

Variable Documentation

◆ dictId

uLong dictId

Definition at line 35 of file example.c.

◆ dictionary

const char dictionary[] = "hello"

Definition at line 34 of file example.c.

◆ hello

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

Definition at line 29 of file example.c.

Referenced by test_compress(), test_deflate(), test_flush(), and test_gzio().