#[export_name = "deflateSetDictionary"]
pub unsafe extern "C-unwind" fn deflateSetDictionary(
strm: z_streamp,
dictionary: *const Bytef,
dictLength: uInt,
) -> c_int
Expand description
Initializes the compression dictionary from the given byte sequence without producing any compressed output.
This function may be called after deflateInit_
, deflateInit2_
or deflateReset
) and before the first call of deflate
.
§Returns
Z_OK
if successZ_STREAM_ERROR
if the stream state was inconsistent
§Safety
The caller must guarantee that
- Either
strm
isNULL
strm
satisfies the requirements of&mut *strm
and was initialized withdeflateInit_
or similar
- Either
dictionary
isNULL
dictionary
anddictLength
satisfy the requirements ofcore::slice::from_raw_parts_mut::<u8>