Function BZ2_bzBuffToBuffCompress

pub unsafe extern "C" fn BZ2_bzBuffToBuffCompress(dest: *mut c_char, destLen: *mut c_uint, source: *mut c_char, sourceLen: c_uint, blockSize100k: c_int, verbosity: c_int, workFactor: c_int) -> c_int

Compress the input data into the destination buffer.

This function attempts to compress the data in source[0 .. sourceLen] into dest[0 .. *destLen]. If the destination buffer is big enough, *destLen is set to the size of the compressed data, and BZ_OK is returned. If the compressed data won't fit, *destLen is unchanged, and BZ_OUTBUFF_FULL is returned.

For the meaning of parameters blockSize100k, verbosity and workFactor, see BZ2_bzCompressInit.

A safe choice for the length of the output buffer is a size 1% larger than the input length, plus 600 extra bytes.

Returns

Safety

The caller must guarantee that