Skip to main content

gzoffset

Function gzoffset 

Source
pub unsafe extern "C" fn gzoffset(file: gzFile) -> z_off_t
Available on crate feature gz only.
Expand description

Return the current compressed (actual) read or write offset of file. This offset includes the count of bytes that precede the gzip stream, for example when appending or when using gzdopen for reading. When reading, the offset does not include as yet unused buffered input. This information can

§Returns

  • The number of bytes prior to the current read or write position in the compressed data stream, on success.
  • -1 on error.

§Safety

  • file, if non-null, must be an open file handle obtained from gzopen or gzdopen.