Function mupdf_sys::fz_new_deflated_data[][src]

pub unsafe extern "C" fn fz_new_deflated_data(
    ctx: *mut fz_context,
    compressed_length: *mut usize,
    source: *const c_uchar,
    source_length: usize,
    level: fz_deflate_level
) -> *mut c_uchar

Compress source_length bytes of data starting at source, into a new memory block malloced for that purpose. compressed_length is updated on exit to contain the size used. Ownership of the block is returned from this function, and the caller is therefore responsible for freeing it. The block may be considerably larger than is actually required. The caller is free to fz_realloc it down if it wants to.