|
ZLIB
|
zlib internal header definitions for gz* operations More...
Go to the source code of this file.
Data Structures | |
| struct | gz_state |
| internal gzip file state data structure More... | |
Typedefs | |
| typedef gz_state FAR * | gz_statep |
Functions | |
| voidp | malloc (uInt size) |
| void | free (voidpf ptr) |
| ZEXTERN gzFile ZEXPORT | gzopen64 (const char *, const char *) |
| ZEXTERN z_off64_t ZEXPORT | gzseek64 (gzFile, z_off64_t, int) |
| Set the starting position to offset relative to whence for the next gzread or gzwrite on file. | |
| ZEXTERN z_off64_t ZEXPORT | gztell64 (gzFile) |
| Return the starting position for the next gzread or gzwrite on file. | |
| ZEXTERN z_off64_t ZEXPORT | gzoffset64 (gzFile) |
| Return the current compressed (actual) read or write offset of file. | |
| void ZLIB_INTERNAL | gz_error (gz_statep, int, const char *) |
| Create an error message in allocated memory and set state->err and state->msg accordingly. | |
| unsigned ZLIB_INTERNAL | gz_intmax (void) |
zlib internal header definitions for gz* operations
Copyright (C) 2004-2019 Mark Adler For conditions of distribution and use, see copyright notice in zlib.h
| void ZLIB_INTERNAL gz_error | ( | gz_statep | state, |
| int | err, | ||
| const char * | msg | ||
| ) |
Create an error message in allocated memory and set state->err and state->msg accordingly.
Free any previous error message already there. Do not try to free or allocate space if the error is Z_MEM_ERROR (out of memory). Simply save the error message as a static string. If there is an allocation failure constructing the error message, then convert the error to out of memory.
| ZEXTERN z_off64_t ZEXPORT gzoffset64 | ( | gzFile | file | ) |
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 be used for a progress indicator. On error, gzoffset64() returns -1.
| ZEXTERN z_off64_t ZEXPORT gzseek64 | ( | gzFile | file, |
| z_off64_t | offset, | ||
| int | whence | ||
| ) |
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); the value SEEK_END is not supported.
If the file is opened for reading, this function is emulated but can be extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek64 then compresses a sequence of zeroes up to the new starting position.
| ZEXTERN z_off64_t ZEXPORT gztell64 | ( | gzFile | file | ) |
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().
gztell64(file) is equivalent to gzseek64(file, 0L, SEEK_CUR)