pub unsafe extern "C-unwind" fn deflatePrime(
strm: z_streamp,
bits: c_int,
value: c_int,
) -> c_intExpand description
Inserts bits in the deflate output stream.
The intent is that this function is used to start off the deflate output with the bits leftover from a previous deflate stream when appending to it.
As such, this function can only be used for raw deflate, and must be used before the first deflate call after a deflateInit2_ or deflateReset.
bits must be less than or equal to 16, and that many of the least significant bits of value will be inserted in the output.
§Returns
Z_OKif successZ_BUF_ERRORif there was not enough room in the internal buffer to insert the bitsZ_STREAM_ERRORif the source stream state was inconsistent
§Safety
The caller must guarantee that
- Either
strmisNULLstrmsatisfies the requirements of&mut *strmand was initialized withdeflateInit_or similar