aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/zlib_nif.c
AgeCommit message (Collapse)Author
2017-11-09Merge branch 'john/erts/fix-gunzip-eos/OTP-14730/ERL-507' into maint-20Erlang/OTP
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507: Only apply EOS behaviors if there's pending data
2017-11-09Fix deflateParams on zlib 1.2.11John Högberg
1.2.11 started bailing when avail_out==0 regardless of whether there's anything to flush or not, and there's no point in adapting the old method since it was vulnerable to bugs in other zlib versions which updated the deflate parameters even on failure. The api_deflateParams test has been expanded accordingly, and two white-box cases in zip_usage has been updated to make fewer assumptions about the output; the validity of the compressed data is what matters, not whether it's exactly the same as the test vector.
2017-11-02Only apply EOS behaviors if there's pending dataJohn Högberg
2017-10-11Add zlib:set_controlling_process/2John Högberg
2017-09-29Fix minor incompatibilities in inflate behaviorJohn Högberg
When presented with multiple valid but concatenated streams, the old driver returned an empty result once the end of the first stream was reached, and kept doing so even if fed new data. The new driver/NIF returned a data_error instead. zlib:inflateInit/3 has been added to control this behavior, but is not yet ready for public use.
2017-09-07Replace ad-hoc MIN/MAX macros with common onesJohn Högberg
Besides being noisy, they were already defined by a global Unix- specific header, causing the Windows build to fail if one forgot to define them.
2017-09-05Improve zlib error messages and update test suite to fitJohn Högberg
OTP-14527
2017-09-05Replace the zlib driver with a NIFJohn Högberg
All operations will now yield appropriately, allowing them to be used freely in concurrent applications. This commit also deprecates the functions listed below, although they won't raise deprecation warnings until OTP 21: zlib:adler32 zlib:crc32 zlib:inflateChunk zlib:getBufSize zlib:setBufSize The behavior of throwing an error when a dictionary is required for decompression has also been deprecated.