--- old/src/share/native/java/util/zip/zlib/deflate.c Wed Nov 22 09:56:14 2017 +++ new/src/share/native/java/util/zip/zlib/deflate.c Wed Nov 22 09:56:14 2017 @@ -505,8 +505,6 @@ s->pending = 0; s->pending_out = s->pending_buf; - s->high_water = 0; /* reset to its inital value 0 */ - if (s->wrap < 0) { s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ } @@ -520,7 +518,7 @@ s->wrap == 2 ? crc32(0L, Z_NULL, 0) : #endif adler32(0L, Z_NULL, 0); - s->last_flush = Z_NO_FLUSH; + s->last_flush = -2; _tr_init(s); @@ -613,7 +611,7 @@ func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && - s->high_water) { + s->last_flush != -2) { /* Flush the last buffer: */ int err = deflate(strm, Z_BLOCK); if (err == Z_STREAM_ERROR)