in reply to Compressing Data On The Fly

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