http://www.perlmonks.org?node_id=457161


in reply to Compressing Data On The Fly

Check out the cuspy PerlIO::gzip (and PerlIO::via in general).