aboutsummaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-09-20 18:49:21 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-09-20 18:55:37 -0700
commit9852c209ac49c0d8d1192e46115d7c37d4344bbd (patch)
tree875f72cb5cbc1724f180cc866cef203ddbe3c075 /zlib.h
parent93b0af4aa73c8debe2cc18e56101700423096146 (diff)
downloadzlib-9852c209ac49c0d8d1192e46115d7c37d4344bbd.tar.gz
zlib-9852c209ac49c0d8d1192e46115d7c37d4344bbd.tar.bz2
zlib-9852c209ac49c0d8d1192e46115d7c37d4344bbd.zip
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.
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/zlib.h b/zlib.h
index 66dc600..67cfd7e 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1769,6 +1769,7 @@ ZEXTERN const char * ZEXPORT zError OF((int));
1769ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); 1769ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
1770ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); 1770ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
1771ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); 1771ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
1772ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
1772ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); 1773ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
1773ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); 1774ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
1774#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) 1775#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)