Bug 14799 – Documentation for std.zlib.compress is incorrect
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-07-14T20:15:00Z
Last change time
2015-10-04T18:20:38Z
Keywords
pull
Assigned to
nobody
Creator
briancschott
Comments
Comment #0 by briancschott — 2015-07-14T20:15:39Z
The documentation for std.zlib.compress states that the valid values for the "level" parameter are 1-9, with 6 being the default. The actual valid values are 0-9, and there is no default argument for the level parameter.
Comment #1 by briancschott — 2015-07-14T20:25:30Z
Correction: The valid values are -1 through 9 (inclusive). -1 is Z_DEFAULT_COMPRESSION, which is -1. This -1 gets translated to 6 inside the C library.
Comment #2 by dlang-bugzilla — 2015-09-01T05:40:40Z