]> git.lizzy.rs Git - zlib.git/commit
Add option to not compute or check check values.
authorMark Adler <madler@alumni.caltech.edu>
Wed, 21 Sep 2016 01:49:21 +0000 (18:49 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Wed, 21 Sep 2016 01:55:37 +0000 (18:55 -0700)
commit9852c209ac49c0d8d1192e46115d7c37d4344bbd
tree875f72cb5cbc1724f180cc866cef203ddbe3c075
parent93b0af4aa73c8debe2cc18e56101700423096146
Add option to not compute or check check values.

The undocumented (except in these commit comments) function
inflateValidate(strm, check) can be called after an inflateInit(),
inflateInit2(), or inflateReset2() with check equal to zero to
turn off the check value (CRC-32 or Adler-32) computation and
comparison. Calling with check not equal to zero turns checking
back on. This should only be called immediately after the init or
reset function. inflateReset() does not change the state, so a
previous inflateValidate() setting will remain in effect.

This also turns off validation of the gzip header CRC when
present.

This should only be used when a zlib or gzip stream has already
been checked, and repeated decompressions of the same stream no
longer need to be validated.
inflate.c
inflate.h
zlib.h