Skip to main content

gzsetparams

Function gzsetparams 

Source
pub unsafe extern "C" fn gzsetparams(
    file: gzFile,
    level: c_int,
    strategy: c_int,
) -> c_int
Available on crate feature gz only.
Expand description

Dynamically update the compression level and strategy for file. See the description of deflateInit2_ for the meaning of these parameters. Previously provided data is flushed before applying the parameter changes.

Note: If level is not valid, this function will silently fail with a return value of Z_OK, matching the semantics of the C zlib version. However, if strategy is not valid, this function will return an error.

§Returns

§Safety

  • file, if non-null, must be an open file handle obtained from gzopen or gzdopen.