Article View: borland.public.cppbuilder.nativeapi
Article #5390Re: Compress/uncompress a Buffer
From: sam
Date: Fri, 19 Aug 2005 14:53
Date: Fri, 19 Aug 2005 14:53
18 lines
1594 bytes
1594 bytes
By debugged I have found where the uncompr.c from ZLIB returned
Z_BUF_ERROR, the inflate(&stream, Z_FINISH) is incriminate :
===
...
err = inflateInit(&stream);
if (err != Z_OK) return err;
err = inflate(&stream, Z_FINISH);
//*HERE* err always = Z_BUF_ERROR even if the destination buffer is biggest
!
if (err != Z_STREAM_END) {
inflateEnd(&stream);
return err == Z_OK ? Z_BUF_ERROR : err;
}
====
Sam
Technical Details
Message-ID:
<4305f25b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4304a1d6@newsgroups.borland.com> <4304a3dd@newsgroups.borland.com> <4304c079@newsgroups.borland.com> <4305934f$1@newsgroups.borland.com> <4305ccc9@newsgroups.borland.com> <4305d471$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,68b90959c01bbcf3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "sam" <s33@hotmail.com> From: "sam" <s33@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4304a1d6@newsgroups.borland.com> <4304a3dd@newsgroups.borland.com> <4304c079@newsgroups.borland.com> <4305934f$1@newsgroups.borland.com> <4305ccc9@newsgroups.borland.com> <4305d471$1@newsgroups.borland.com> Subject: Re: Compress/uncompress a Buffer Date: Fri, 19 Aug 2005 16:53:19 +0200 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 83.195.12.122 Message-ID: <4305f25b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124463195 83.195.12.122 (19 Aug 2005 07:53:15 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail