I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-03-28 09:08:53-07 by pmarquess in response to 7490
Re: Uncompress returns -3
Although the has absolutely nothing to do with the Compress::Zlib perl module, I can guess what your problem is.

Assuming the uncompress function you are calling is the one supplied with the zlib library, then that cannot be used to if you are manipulating a zip file. The compress/uncompress functions supplied in zlib manipulate RFC 1950 data streams. For a zip file you need to work with RFC1951 data streams.

To do that you need to use the inflateInit2 and inflate functions supplied with zlib. To get inflateInit2 to work in RFC1951 mode, you need to set the windowBits parameter to -15 (i.e. minus 15).

Paul
Direct Responses: Write a response