libz_rs_sys

Function compress2

Source
#[export_name = "compress2"]
pub unsafe extern "C-unwind" fn compress2(
    dest: *mut Bytef,
    destLen: *mut c_ulong,
    source: *const Bytef,
    sourceLen: c_ulong,
    level: c_int,
) -> c_int
Expand description

Compresses source into dest, and writes the final deflated size into destLen.

The level parameter has the same meaning as in deflateInit_. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed data.

§Returns

§Safety

The caller must guarantee that