Skip Menu |
 

This queue is for tickets about the Compress-Raw-Zlib CPAN distribution.

Report information
The Basics
Id: 40566
Status: resolved
Priority: 0/
Queue: Compress-Raw-Zlib

People
Owner: Nobody in particular
Requestors: john [...] feibusch.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.017



Subject: apparent documentation omission for Compress::Raw::Zlib
Date: Fri, 31 Oct 2008 11:13:15 -0700
To: bug-Compress-Raw-Zlib [...] rt.cpan.org
From: "John Feibusch" <john [...] feibusch.com>
Download (untitled) / with headers
text/plain 819b
Hi, I was trying to deflate multiple documents with one deflation object in Compress::Raw::Zlib. The first document compressed OK, but all documents after that got "stream_error". I looked at the zlib documentation and found that you need to call deflateReset after a flush with Z_FINISH, and the xsub file had that function but the doc did not. So I added this to my script inside the loop: $deflator->deflateReset(); and then everything seemed to work OK. But this function isn't in the Compress::Raw::Zlib documentation. So, it seems to me that the documentation should be changed to include the "deflateReset" function, and the "flush" function should say that if you call it with Z_FINISH, then you have to call deflateReset if you are going to use that deflator object again. Is that correct? Thanks! john
On Fri Oct 31 14:13:36 2008, john@feibusch.com wrote: Show quoted text
> Hi, > I was trying to deflate multiple documents with one deflation object in > Compress::Raw::Zlib. The first document compressed OK, but all documents > after that got "stream_error". I looked at the zlib documentation and
found Show quoted text
> that you need to call deflateReset after a flush with Z_FINISH, and
the xsub Show quoted text
> file had that function but the doc did not. So I added this to my script > inside the loop: > > $deflator->deflateReset(); > > and then everything seemed to work OK. But this function isn't in the > Compress::Raw::Zlib documentation. > > So, it seems to me that the documentation should be changed to include the > "deflateReset" function, and the "flush" function should say that if you > call it with Z_FINISH, then you have to call deflateReset if you are going > to use that deflator object again. Is that correct?
Yes, it is. deflateReset is currently undocumented, but is used for this very thing in the IO-Compress-Zlib module. Will add some documentation for it. cheers Paul


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.