On Thursday, 20 April 2017 at 20:19:31 UTC, Era Scarecrow wrote:
I took the UnCompress example and tried to make use of it, however it breaks midway through my program with nothing more than 'Data Error'.

See the tip of the week here:

http://arsdnet.net/this-week-in-d/2016-apr-24.html

In short, byChunk reuses its buffer, and std.zlib holds on to the pointer. That combination leads to corrupted data.


Easiest fix is to .dup the chunk... I don't know of one off the top of my head that avoids the allocation using any of the std.zlib functions.

Reply via email to