Bug 8779 – std.zlib.UnCompress needs a way to detect end-of-stream

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-08T02:24:53Z
Last change time
2017-10-16T09:57:52Z
Assigned to
No Owner
Creator
Sönke Ludwig

Comments

Comment #0 by sludwig — 2012-10-08T02:24:53Z
The return value of the inflate() call is currently not distinguished between Z_OK and Z_STREAM_END. However, this information is necessary if the size of the inflated stream is unknown. UnCompress either needs to return a status with each uncompress() call, or, probably better, get an empty() property that is set accordingly.
Comment #1 by github-bugzilla — 2017-09-14T16:53:00Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/fdbf5e4a5acabf55e02f360374b0a1600c367a55 std.zlib: Add UnCompress.empty Implement std.zlib.UnCompress.empty() which returns whether all input has been processed. Fix issue 8779. https://github.com/dlang/phobos/commit/8e47bfc54c106b222835db3c3a37e81b52ab2f04 Merge pull request #5720 from kas-luthor/fix-zlib Fix zlib issues 3191, 9505 and 8779 merged-on-behalf-of: MetaLang <[email protected]>
Comment #2 by github-bugzilla — 2017-10-16T09:57:52Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/fdbf5e4a5acabf55e02f360374b0a1600c367a55 std.zlib: Add UnCompress.empty https://github.com/dlang/phobos/commit/8e47bfc54c106b222835db3c3a37e81b52ab2f04 Merge pull request #5720 from kas-luthor/fix-zlib Fix zlib issues 3191, 9505 and 8779 merged-on-behalf-of: MetaLang <[email protected]>