see also the source to Tie::Gzip which demonstrates (un)gzip using Compress::Zlib if installed.
In reply to Re: gzip / gunzip by hossman in thread gzip / gunzip by wufnik