zlib.h File Reference

Typedef alloc_func

typedef voidpf (* alloc_func

The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) but other algorithms will be added later and will have the same stream interface.

Compression can be done in a single step if the buffers are large enough (for example if an input file is mmap'ed), or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call.

The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951.

The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.

This library can optionally read and write gzip streams in memory as well.

The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib.

The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. Function pointer - used to allocate the internal state

Typedef free_func

typedef void(* free_func

Function pointer - used to free the internal state

Typedef z_stream

typedef struct z_stream_s z_stream

Encapsulates a zip stream

Typedef z_streamp

typedef z_stream FAR * z_streamp

typedef z_stream* as z_streamp. Refer to z_stream_s for more details

Typedef gz_header

typedef struct gz_header_s gz_header

gzip header information passed to and from zlib routines. See RFC 1952 for more details on the meanings of these fields.

Typedef gz_headerp

typedef gz_header FAR * gz_headerp

gz_headerp is typedef gz_header*

Typedef in_func

typedef unsigned(* in_func

Input function pointer defined to be used in inflateBack

Typedef out_func

typedef int(* out_func

Output function pointer defined to be used in inflateBack

Typedef gzFile

typedef voidp gzFile

gzfile is typedef to voidp i.e. void pointer(void*)