aboutsummaryrefslogtreecommitdiff
path: root/examples/zran.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2024-02-04 11:33:11 -0800
committerMark Adler <madler@alumni.caltech.edu>2024-02-04 18:49:40 -0800
commit6378d33478ea2d068960aa4e68cf9f11a5ffcfbe (patch)
treeb114ca444ecc7bfdbfec639d5d9561514c2ae501 /examples/zran.h
parentbb054d95d0336f8d36c85c5f1d8a98f935a3c131 (diff)
downloadzlib-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.h1
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