In the zlib C API, this structure exposes just enough of the internal state
of an open gzFile to support the gzgetc C macro. Since Rust code won’t be
using that C macro, we define gzFile_s as an empty structure.
Give the same result as crc32_combine, using op in place of len2.
op is is generated from len2 by crc32_combine_gen.
This will be faster than crc32_combine if the generated op is used more than once.
Set the internal buffer size used by this library’s functions for file to
size. The default buffer size is 128 KB. This function must be called
after gzopen or gzdopen, but before any other calls that read or write
the file (including gzdirect). The buffer memory allocation is always
deferred to the first read or write. Three times size in buffer space is
allocated.
Given an open file descriptor, prepare to read or write a gzip file.
NOTE: This is similar to gzopen, but for cases where the caller already
has the file open.
Flush all pending output buffered in file. The parameter flush is interpreted
the same way as in the deflate function. The return value is the zlib error
number (see gzerror). gzflush is permitted only when writing.
Read and decompress up to nitems items of size size from file into buf,
otherwise operating as gzread does. This duplicates the interface of
C stdio’s fread(), with size_t request and return types.
Read decompressed bytes from file into buf, until len-1 characters are
read, or until a newline character is read and transferred to buf, or an
end-of-file condition is encountered. If any characters are read or if len
is one, the string is terminated with a null character. If no characters
are read due to an end-of-file or len is less than one, then the buffer is
left untouched.
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
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
Read and decompress up to len uncompressed bytes from file into buf. If
the input file is not in gzip format, gzread copies up to len bytes into
the buffer directly from the file.
Set the starting position to offset relative to whence for the next gzread
or gzwrite on file. The offset represents a number of bytes in the
uncompressed data stream. The whence parameter is defined as in lseek(2),
but only SEEK_CUR (relative to current position) and SEEK_SET (absolute from
start of the uncompressed data stream) are supported.
Set the starting position to offset relative to whence for the next gzread
or gzwrite on file. The offset represents a number of bytes in the
uncompressed data stream. The whence parameter is defined as in lseek(2),
but only SEEK_CUR (relative to current position) and SEEK_SET (absolute from
start of the uncompressed data stream) are supported.
Dynamically update the compression level and strategy for file. See the
description of deflateInit2_ for the meaning of these parameters. Previously
provided data is flushed before applying the parameter changes.
Return the starting position for the next gzread or gzwrite on file.
This position represents a number of bytes in the uncompressed data stream,
and is zero when starting, even if appending or reading a gzip stream from
the middle of a file using gzdopen.
Return the starting position for the next gzread or gzwrite on file.
This position represents a number of bytes in the uncompressed data stream,
and is zero when starting, even if appending or reading a gzip stream from
the middle of a file using gzdopen.