Is there some particular advantage to using a Perl library, as opposed to a command-line utility that is working for you? I would personally just use gunzip, read the file line by line if you don't want the whole thing in memory, then unlink it or gzip it again.
This is a simplified version for troubleshooting of utility code that I use to open many different types of files. The utility code includes recognizing various file types and accessing files on local and remote servers. :)