libz_rs_sys

Function deflateTune

Source
#[export_name = "deflateTune"]
pub unsafe extern "C-unwind" fn deflateTune(
    strm: z_streamp,
    good_length: c_int,
    max_lazy: c_int,
    nice_length: c_int,
    max_chain: c_int,
) -> c_int
Expand description

Fine tune deflate’s internal compression parameters.

This should only be used by someone who understands the algorithm used by zlib’s deflate for searching for the best matching string, and even then only by the most fanatic optimizer trying to squeeze out the last compressed bit for their specific input data. Read the deflate.rs source code for the meaning of the max_lazy, good_length, nice_length, and max_chain parameters.

§Returns

§Safety

The caller must guarantee that

  • Either
    • strm is NULL
    • strm satisfies the requirements of &mut *strm and was initialized with deflateInit_ or similar