On Tuesday, 5 March 2019 at 02:19:26 UTC, Adam D. Ruppe wrote:
I haven't found the bug in your code yet, but one thing I suspect from my experience is you might be reusing a buffer. std.zlib actually stores pointers internally across function calls, so if you are trying to compress a stream, you are liable to get corruption.

(std.zlib is very bad code, frankly.)

I don't know for sure though, my brain is in the compiler tonight...

Thanks, it seems I'll have to write my own solution for this, and I really dislike the way streaming compression works in C. I've spotted some other bugs regarding my PNG implementation, but those were unrelated and didn't improve the compression issues.

Reply via email to