#[unsafe(export_name = "BZ2_bzwrite")]pub unsafe extern "C" fn BZ2_bzwrite(
b: *mut BZFILE,
buf: *const c_void,
len: c_int,
) -> c_intExpand description
Absorbs len bytes from the buffer buf, eventually to be compressed and written to the file.
Analogous to libc::fwrite.
§Returns
The value len on success, or -1 on failure.
§Safety
The caller must guarantee that
- Either
bisNULLbis initialized withBZ2_bzWriteOpenorBZ2_bzReadOpen
- Either
bufisNULLbufis readable forlenbytes