#[unsafe(export_name = "BZ2_bzWrite")]pub unsafe extern "C" fn BZ2_bzWrite(
bzerror: *mut c_int,
b: *mut BZFILE,
buf: *const c_void,
len: c_int,
)Expand description
Absorbs len bytes from the buffer buf, eventually to be compressed and written to the file.
§Returns
§Possible assignments to bzerror
BZ_PARAM_ERRORif any ofb.is_null()buf.is_null()len < 0
BZ_SEQUENCE_ERRORif b was opened withBZ2_bzReadOpenBZ_IO_ERRORif there is an error writing to the compressed fileBZ_OKotherwise
§Safety
The caller must guarantee that
bzerrorsatisfies the requirements ofpointer::as_mut- Either
bisNULLbis initialized withBZ2_bzWriteOpenorBZ2_bzReadOpen
- Either
bufisNULLbufis writable forlenbytes