SWILIB API (NSG)    
Loading...
Searching...
No Matches
ZLIB

Detailed Description

Built-in zlib functions.

See zlib 1.2.1 docs for more information.

Usage: #include <swilib.h> or #include <swilib/zlib.h>

Note
For GCC: These functions is available only when define -DSWILIB_ZLIB is specified in compiler flags.
Alternatively, you can include these functions directly by #include <swilib/zlib.h>

Functions

int inflateInit2_ (z_streamp strm, int windowBits, char *version, int stream_size)
 Initialize the decompression system.
 
int inflate (z_streamp strm, int flush)
 Attempt to decompress data until either the input buffer is empty or the output buffer is full.
 
int inflateEnd (z_streamp strm)
 Free all allocated state information referenced by stream.
 

Function Documentation

◆ inflateInit2_()

int inflateInit2_ ( z_streamp strm,
int windowBits,
char * version,
int stream_size )

Initialize the decompression system.

Parameters
strmallocated z_stream object
windowBitsa base 2 logarithm of the maximum window size to use, and shall be a value between 8 and 15
versionlibrary version, set to ZLIB_VERSION
stream_sizesizeof(z_stream)
Returns
Z_OK or error

◆ inflate()

int inflate ( z_streamp strm,
int flush )

Attempt to decompress data until either the input buffer is empty or the output buffer is full.

Parameters
strmallocated z_stream object
flushZ_NO_FLUSH / Z_SYNC_FLUSH / Z_BLOCK / Z_FINISH
Returns
Z_OK or error

◆ inflateEnd()

int inflateEnd ( z_streamp strm)

Free all allocated state information referenced by stream.

Parameters
strmallocated z_stream object
Returns
Z_OK or error