Thread overview
std.zlib help
Oct 08, 2004
kinghajj
Oct 08, 2004
J C Calvarese
Oct 08, 2004
kinghajj
October 08, 2004
Sometimes when I use std.zlib.uncompress(), I get a "buf error". Anyone know what this is? the data I'm uncompressing was compressed with std.zlib.compress at level 6.


October 08, 2004
kinghajj wrote:
> Sometimes when I use std.zlib.uncompress(), I get a "buf error". Anyone know
> what this is? the data I'm uncompressing was compressed with std.zlib.compress
> at level 6.

I'd guess that the buffer isn't big enough for the uncompressed data. It does sound like a bug with std.zlib since this should be taken care of automatically.

First, you should make sure that you're using the latest version of DMD since there was a bug in std.zlib that was found and fixed recently. Your bug sounds similar to that bug. I think it generated a "buf error", too.

If you're using the latest version, it might be that the bug wasn't quite squashed. Post some test code and the rest of us can verify the bug and look for a fix.

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
October 08, 2004
I'm using DMD .101. I'll upgrade to .102 as soon as I have the time today. Thx!

In article <ck53ng$n7k$1@digitaldaemon.com>, J C Calvarese says...
>
>kinghajj wrote:
>> Sometimes when I use std.zlib.uncompress(), I get a "buf error". Anyone know what this is? the data I'm uncompressing was compressed with std.zlib.compress at level 6.
>
>I'd guess that the buffer isn't big enough for the uncompressed data. It does sound like a bug with std.zlib since this should be taken care of automatically.
>
>First, you should make sure that you're using the latest version of DMD since there was a bug in std.zlib that was found and fixed recently. Your bug sounds similar to that bug. I think it generated a "buf error", too.
>
>If you're using the latest version, it might be that the bug wasn't quite squashed. Post some test code and the rest of us can verify the bug and look for a fix.
>
>-- 
>Justin (a/k/a jcc7)
>http://jcc_7.tripod.com/d/