Re: std.zlib odd behavior

2019-05-20 Thread solidstate1991 via Digitalmars-d-learn
On Wednesday, 6 March 2019 at 01:50:16 UTC, solidstate1991 wrote: 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

Re: std.zlib odd behavior

2019-03-05 Thread solidstate1991 via Digitalmars-d-learn
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,

Re: std.zlib odd behavior

2019-03-05 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 5 March 2019 at 01:43:42 UTC, solidstate1991 wrote: https://github.com/ZILtoid1991/dimage/blob/master/source/dimage/png.d It seems that after a certain point, it doesn't add more data to the compression stream, flushing doesn't help. What do you mean by "doesn't add"? ubyte[]

Re: std.zlib odd behavior

2019-03-04 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 5 March 2019 at 01:43:42 UTC, solidstate1991 wrote: https://github.com/ZILtoid1991/dimage/blob/master/source/dimage/png.d It seems that after a certain point, it doesn't add more data to the compression stream, flushing doesn't help. I haven't found the bug in your code yet, but

std.zlib odd behavior

2019-03-04 Thread solidstate1991 via Digitalmars-d-learn
https://github.com/ZILtoid1991/dimage/blob/master/source/dimage/png.d It seems that after a certain point, it doesn't add more data to the compression stream, flushing doesn't help.