summaryrefslogtreecommitdiff
path: root/inflate.h
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-06-18 20:22:09 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-06-28 11:16:05 +0200
commit10be7c55f66e08f97c15afb5c5af985094155b5a (patch)
tree7311a43bb3c8c79d3825d9da65e932f256a732d5 /inflate.h
parente40d88adc9e8180969c6c56a0deb4ec69c3ec92b (diff)
Only calculate inflate chunk size once and store it for future use for performance.
Diffstat (limited to 'inflate.h')
-rw-r--r--inflate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/inflate.h b/inflate.h
index 384459a..d9dda79 100644
--- a/inflate.h
+++ b/inflate.h
@@ -126,6 +126,7 @@ struct inflate_state {
int sane; /* if false, allow invalid distance too far */
int back; /* bits back of last unprocessed length/lit */
unsigned was; /* initial length of match */
+ uint32_t chunksize; /* size of memory copying chunk */
};
int ZLIB_INTERNAL inflate_ensure_window(struct inflate_state *state);