summaryrefslogtreecommitdiff
path: root/source4/lib/zlib/inflate.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/zlib/inflate.c')
-rw-r--r--source4/lib/zlib/inflate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/lib/zlib/inflate.c b/source4/lib/zlib/inflate.c
index 792fdee8e9..0c1ff17951 100644
--- a/source4/lib/zlib/inflate.c
+++ b/source4/lib/zlib/inflate.c
@@ -100,8 +100,9 @@ local int updatewindow OF((z_streamp strm, unsigned out));
local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
+int ZEXPORT inflateReset2(strm, flags)
z_streamp strm;
+unsigned flags;
{
struct inflate_state FAR *state;
@@ -115,8 +116,10 @@ z_streamp strm;
state->havedict = 0;
state->dmax = 32768U;
state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
+ if (!(flags & Z_RESET_KEEP_WINDOW)) {
+ state->wsize = 0;
+ state->whave = 0;
+ }
state->write = 0;
state->hold = 0;
state->bits = 0;
@@ -125,6 +128,12 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ return inflateReset2(strm, 0);
+}
+
int ZEXPORT inflatePrime(strm, bits, value)
z_streamp strm;
int bits;