Skip to main content

gzwrite

Function gzwrite 

Source
pub unsafe extern "C" fn gzwrite(
    file: gzFile,
    buf: *const c_void,
    len: c_uint,
) -> c_int
Available on crate feature gz only.
Expand description

Compress and write the len uncompressed bytes at buf to file.

§Returns

  • The number of uncompressed bytes written, on success.
  • Or 0 in case of error.

§Safety

  • file, if non-null, must be an open file handle obtained from gzopen or gzdopen.
  • buf must point to at least len bytes of readable memory.