Inflater nowrap and padding byte requirement (original) (raw)
Dawid Weiss dawid.weiss at gmail.com
Fri Jan 12 10:08:48 UTC 2018
- Previous message: [10] RFR 8194959: Correct test tag to move bugid from @test to @bug
- Next message: RFR: 8193710 - jcmd -l and jps commands do not list Java processes running in Docker containers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
The javadoc for Inflater states that:
* Note: When using the 'nowrap' option it is also necessary to provide
* an extra "dummy" byte as input. This is required by the ZLIB native
* library in order to support certain optimizations.
This doesn't seem to be a requirement anymore in newer zlib versions, as clarified by Mark Adler himself [1]. The changelog for zlib 1.2.0 indeed mentions this "zero byte" padding isn't required anymore [2]:
Changes in 1.2.0 (9 March 2003) [...] - Raw inflate no longer needs an extra dummy byte at end
Perhaps it'd make sense to remove it from the JavaDoc, so that there's no need to complicate downstream code?
Dawid
[1] https://stackoverflow.com/a/9779941 [2] https://www.zlib.net/ChangeLog.txt
- Previous message: [10] RFR 8194959: Correct test tag to move bugid from @test to @bug
- Next message: RFR: 8193710 - jcmd -l and jps commands do not list Java processes running in Docker containers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]