diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2025-02-24 23:49:51 -0800 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2025-05-13 18:00:03 -0700 |
| commit | a9bb8c48d7fa233651dbc79407df0a83f27bbeda (patch) | |
| tree | 8db70bef2aef701282e5183f38b747285110f3e2 | |
| parent | aaf94f387d78b03b6cb2a735ca32ce3c44fedea4 (diff) | |
| download | zlib-a9bb8c48d7fa233651dbc79407df0a83f27bbeda.tar.gz zlib-a9bb8c48d7fa233651dbc79407df0a83f27bbeda.tar.bz2 zlib-a9bb8c48d7fa233651dbc79407df0a83f27bbeda.zip | |
Note the use of gzungetc() to run a deferred seek while reading.
| -rw-r--r-- | zlib.h | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -1549,6 +1549,11 @@ ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); | |||
| 1549 | output buffer size of pushed characters is allowed. (See gzbuffer above.) | 1549 | output buffer size of pushed characters is allowed. (See gzbuffer above.) |
| 1550 | The pushed character will be discarded if the stream is repositioned with | 1550 | The pushed character will be discarded if the stream is repositioned with |
| 1551 | gzseek() or gzrewind(). | 1551 | gzseek() or gzrewind(). |
| 1552 | |||
| 1553 | gzungetc(-1, file) will force any pending seek to execute. Then gztell() | ||
| 1554 | will report the position, even if the requested seek reached end of file. | ||
| 1555 | This can be used to determine the number of uncompressed bytes in a gzip | ||
| 1556 | file without having to read it into a buffer. | ||
| 1552 | */ | 1557 | */ |
| 1553 | 1558 | ||
| 1554 | ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); | 1559 | ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); |
