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> |
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