pub unsafe extern "C" fn BZ2_bzCompressInit(
strm: *mut bz_stream,
blockSize100k: c_int,
verbosity: c_int,
workFactor: c_int,
) -> c_intExpand description
Prepares the stream for compression.
§Returns
BZ_PARAM_ERRORif any ofstrm.is_null()!(1..=9).contains(&blockSize100k)!(0..=4).contains(&verbosity)!(0..=250).contains(&workFactor)- no valid allocator could be configured
BZ_MEM_ERRORif insufficient memory is availableBZ_OKotherwise
§Safety
The caller must guarantee that
- Either
strmisNULLstrmsatisfies the requirements of&mut *strm
- The
bzalloc,bzfreeandopaquefields form a valid allocator.