Linux Standard Base Core Specification 3.0Preview1 | ||
---|---|---|
<<< Previous | Next >>> |
The inflateInit_() function shall initialize the decompression system. On entry, stream shall refer to a user supplied z_stream object (a z_stream_s structure). The following fields shall be set on entry:
zalloc
a pointer to an alloc_func function, used to allocate state information.
If this is NULL
, a default allocation function will be used.
zfree
a pointer to a free_func function, used to free memory allocated by the
zalloc
function. If this is NULL
a default free function will be used.
opaque
If alloc_func
is not NULL
,
opaque
is a user supplied pointer to data that will be passed to the
alloc_func
and free_func
functions.
If the version requested is not compatible with the version
implemented, or if the size of the z_stream_s structure
provided in stream_size does not match the size in the library
implementation, inflateInit_() shall fail, and return
Z_VERSION_ERROR
.
The inflateInit_() function is not in the source standard; it is only in the binary standard. Source applications should use the inflateInit() macro.
The inflateInit_() shall be equivalent to
inflateInit2_(strm, DEF_WBITS, version, stream_size); |
On success, the inflateInit_() function shall return
Z_OK
.
Otherwise, inflateInit_() shall return
a value as described below to indicate the error.
On error, inflateInit_() shall return one of the following error indicators:
Z_STREAM_ERROR
Invalid parameter.
Z_MEM_ERROR
Insufficient memory available.
Z_VERSION_ERROR
The version requested is not compatible with the library version, or the z_stream size differs from that used by the library.
In addition, the msg
field of the strm
may be set to an error message.
<<< Previous | Home | Next >>> |
inflateInit2_ | Up | inflateReset |