pub unsafe extern "C" fn BZ2_bzCompressInit(
strm: *mut bz_stream,
blockSize100k: c_int,
verbosity: c_int,
workFactor: c_int,
) -> c_int
Expand description
Prepares the stream for compression.
§Returns
BZ_PARAM_ERROR
if any ofstrm.is_null()
!(1..=9).contains(&blockSize100k)
!(0..=4).contains(&verbosity)
!(0..=250).contains(&workFactor)
- no valid allocator could be configured
BZ_MEM_ERROR
if insufficient memory is availableBZ_OK
otherwise
§Safety
The caller must guarantee that
- Either
strm
isNULL
strm
satisfies the requirements of&mut *strm
- The
bzalloc
,bzfree
andopaque
fields form a valid allocator.