Commit 767c4c9 for zlib

commit 767c4c947852e143f582c85f14cf573411df1b35
Author: Mika T. Lindqvist <postmaster@raasu.org>
Date:   Tue Jun 9 18:23:30 2026 +0300

    Honor deflateReset promise to reset the header.

    This corrects the code to match the documentation in zlib.h.
    However, note that this may break code out there that assumed the
    incorrect persistence of the header across resets.

diff --git a/deflate.c b/deflate.c
index a5be5e6..59220e4 100644
--- a/deflate.c
+++ b/deflate.c
@@ -445,7 +445,6 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
     s->status = INIT_STATE;     /* to pass state test in deflateReset() */

     s->wrap = wrap;
-    s->gzhead = Z_NULL;
     s->w_bits = (uInt)windowBits;
     s->w_size = 1 << s->w_bits;
     s->w_mask = s->w_size - 1;
@@ -671,6 +670,8 @@ int ZEXPORT deflateResetKeep(z_streamp strm) {
         adler32(0L, Z_NULL, 0);
     s->last_flush = -2;

+    s->gzhead = Z_NULL;
+
     _tr_init(s);

     return Z_OK;