Skip to main content

BZ2_bzCompressInit

Function BZ2_bzCompressInit 

Source
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

Note: unlike BZ2_bzDecompressInit, verbosity is not validated. Only values in 0..=4 have any effect: 0 suppresses all output, and higher values enable progressively more verbose diagnostic output.

§Safety

The caller must guarantee that

  • Either
    • strm is NULL
    • strm satisfies the requirements of &mut *strm
  • The bzalloc, bzfree and opaque fields form a valid allocator.