From 1b3b07e78580435477eec4d8558e91167b7c03aa Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 28 Feb 2017 14:52:08 +0100 Subject: zlib: Add warning for option WindowBits values 8 and -8. --- erts/doc/src/zlib.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 138414a880..583d21ad7b 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -315,6 +315,15 @@ list_to_binary([B1,B2]) WindowBits value suppresses the zlib header (and checksum) from the stream. Notice that the zlib source mentions this only as a undocumented feature.

+ +

Due to a known bug in zlib, WindowsBits values 8 and -8 + do not work as expected. In zlib versions before 1.2.9 values + 8 and -8 are automatically changed to 9 and -9. From zlib version 1.2.9 + value -8 is rejected causing zlib:deflateInit/6 to fail + (8 is still changed to 9). It also seem possible that future versions + of zlib may fix this bug and start accepting 8 and -8 as is.

+

Conclusion: Avoid values 8 and -8 unless you know your zlib version supports them.

+
MemLevel -- cgit v1.2.3