pub unsafe extern "C" fn BZ2_bzCompress(
strm: *mut bz_stream,
action: c_int,
) -> c_intExpand description
Compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.
§Returns
BZ_SEQUENCE_ERRORif called on an invalid stream, e.g.- before
BZ2_bzCompressInit - after
BZ2_bzCompressEnd
- before
BZ_PARAM_ERRORif any ofBZ_RUN_OKsuccessfully compressed, but ran out of input or output spaceBZ_FLUSH_OKnot all compressed data has been written to the output yetBZ_FINISH_OKif all input has been read but not all output has been written to the output buffer yetBZ_STREAM_ENDif all input has been read all output has been written to the output buffer
§Safety
- Either
strmisNULLstrmsatisfies the requirements of&mut *strmand was initialized withBZ2_bzCompressInit
- Either
strm.next_inisNULLandstrm.avail_inis 0strm.next_inis readable forstrm.avail_inbytes
- Either
strm.next_outisNULLandstrm.avail_outis0strm.next_outis writable forstrm.avail_outbytes