Proposed fix for JDK-8028804 (Deflater.deflateBytes() may produce corrupted output on Deflater level/strategy change)

Thomas Stüfe thomas.stuefe at
Tue Nov 26 14:06:42 UTC 2013

Hi Alan,

On 26 November 2013 14:55, Alan Bateman <Alan.Bateman at> wrote:

> I think you're right but I wonder if this is something that needs to be
> brought upstream to the zlib project in order to get the support in
> deflateParams (or a new function).

I reported this bug to the authors of the zlib and they confirmed the bug
and the workaround. But even if they fix the current zlib, the jdk uses an
older version, so this will not help us now, or?

> My concern with having a dependency on a patched zlib is that I don't know
> how it will work when using the system libz (the default on Mac, or on
> Linux if you configure with --with-zlib=system).

That would break. Probably just prevents from loading because of
missing imports. Okay, I can try to build a different workaround which
leaves the zlib alone.


More information about the core-libs-dev mailing list