diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2024-02-04 11:33:11 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2024-02-04 18:49:40 -0800 |
commit | 6378d33478ea2d068960aa4e68cf9f11a5ffcfbe (patch) | |
tree | b114ca444ecc7bfdbfec639d5d9561514c2ae501 /examples/zran.h | |
parent | bb054d95d0336f8d36c85c5f1d8a98f935a3c131 (diff) | |
download | zlib-6378d33478ea2d068960aa4e68cf9f11a5ffcfbe.tar.gz zlib-6378d33478ea2d068960aa4e68cf9f11a5ffcfbe.tar.bz2 zlib-6378d33478ea2d068960aa4e68cf9f11a5ffcfbe.zip |
Provide a reusable inflate engine in the index in example/zran.c.
Avoids the overhead of creating a new inflate engine for each
random access extraction.
Diffstat (limited to 'examples/zran.h')
-rw-r--r-- | examples/zran.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/zran.h b/examples/zran.h index 8a332d6..23fbd1f 100644 --- a/examples/zran.h +++ b/examples/zran.h | |||
@@ -20,6 +20,7 @@ struct deflate_index { | |||
20 | int mode; // -15 for raw, 15 for zlib, or 31 for gzip | 20 | int mode; // -15 for raw, 15 for zlib, or 31 for gzip |
21 | off_t length; // total length of uncompressed data | 21 | off_t length; // total length of uncompressed data |
22 | point_t *list; // allocated list of access points | 22 | point_t *list; // allocated list of access points |
23 | z_stream strm; // re-usable inflate engine for extraction | ||
23 | }; | 24 | }; |
24 | 25 | ||
25 | // Make one pass through a zlib, gzip, or raw deflate compressed stream and | 26 | // Make one pass through a zlib, gzip, or raw deflate compressed stream and |