| Module Info
| Add a review of IO-Zlib
Don't expect this module to do everything you want it to.
This module is not a literal subclass of IO::Handle so don't expect to do any type-checking like $fh->isa('IO::Handle').
Also, -r doesn't work on a IO::Zlib object like it does on an IO::Handle object.
Otherwise, it works pretty well.
IO::Zlib is a handy wrapper around the Compress::Zlib library that allows reading and writing of compressed content via a standard Perl filehandle. The module's emulation of a filehandle is flawed, but that's primarily due to limitations of the Compress::Zlib library, which requires a real fileno for IO, so pseudo-filehandles (like IO::String) will fail.
The documentation is adequate, but could use a discussion of the module's limitations and references to alternatives (i.e. PerlIO::gzip).
Great for simplifying the handling of gzipped files, because it allows you to use the standard perl filehandle interface. However, you have to be careful and not take the filehandle analogy too far, as many standard filehandle methods are not supported. For example, $/, seek, and tell. This means that you can't slurp files using the conventional idioms, and that you can't pass the filehandle to other modules that expect a fully functional filehandle. Note that I don't blame the authors for these limitations, as they are a consequence of the limitations of the underlying modules and libraries.
For a more transparent alternative (but with its own caveats as well), you can consider PerlIO::gzip, but it requires perl 5.8.x.