Article View: borland.public.cppbuilder.nativeapi
Article #5387Re: Compress/uncompress a Buffer
From: Andrue Cope [TeamB]
Date: Fri, 19 Aug 2005 12:45
Date: Fri, 19 Aug 2005 12:45
22 lines
1738 bytes
1738 bytes
sam wrote: > but the UNCOMPRESSSTRING generates error Z_BUF_ERROR. > What is wrong ? Well I don't like the way you are using AnsiString to hold binary data for one thing. AnsiString /can/ be used for that but it's asking for trouble. In your case I don't think that's the problem but it's an ugly solution. > ulBuffLen = sString.Length() + pMaxBuffer+12 Is this calculation yielding a large enough value? The documentation in the header discusses return values and states: "..Z_BUF_ERROR if no progress is possible or if there was not enough room in the output buffer when Z_FINISH is used." -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<4305d471$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,68b90959c01bbcf3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address> Subject: Re: Compress/uncompress a Buffer 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> Date: Fri, 19 Aug 2005 13:45:53 +0100 User-Agent: XanaNews/1.17.5.9 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 217.207.223.34 Message-ID: <4305d471$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124455537 217.207.223.34 (19 Aug 2005 05:45:37 -0700) Lines: 22 X-Authenticated-User: acope Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail