|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: examples using Compress::Zlib ?by grinder (Bishop) |
| on Sep 10, 2001 at 13:03 UTC ( [id://111439]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I was going to post my own SoPW on my troubles at getting Compress::Zlib to work, and Super Search pointed me here. Based on the code samples here, I was able to get my test case (a line-oriented zip/unzip) to work correctly. Specifically, my problem was that I was creating a $gz handle using deflateInit(). So here's my code for future readers in the same predicament:
I think it's pretty self-explanatory... This does leave me with one question, however, and that is, how can I specify the that the writer uses different compression strategies, à la Z_BEST_SPEED and Z_BEST_COMPRESSION? update: in reply to idnopheq's suggestion, despite have 512Mb RAM, I'd rather not have this hanging around in RAM, I actually want to dump it straight out onto tape. I initially used a deflateInit approach and wrote the output to a file myself, but I was unable to successfully read it back using gzopen on the resulting file. --g r i n d e r
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||