aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2025-02-24 23:49:51 -0800
committerMark Adler <madler@alumni.caltech.edu>2025-05-13 18:00:03 -0700
commita9bb8c48d7fa233651dbc79407df0a83f27bbeda (patch)
tree8db70bef2aef701282e5183f38b747285110f3e2
parentaaf94f387d78b03b6cb2a735ca32ce3c44fedea4 (diff)
downloadzlib-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/zlib.h b/zlib.h
index c055ecb..1a57127 100644
--- a/zlib.h
+++ b/zlib.h
@@ -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
1554ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); 1559ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);