in reply to Can I modify a single chunk of a gzip stream?

I'm not sure this will help, but if you have a situation where you are dealing with input and output file handles, and the corresponding "files" are both supposed to be gzip compressed, you probably want to try PerlIO::gzip -- it sets up (un)compression as a PerlIO layer:
use PerlIO::gzip; open my $fh, "<:gzip", $gzfile or die "$gzfile: $!\n"; binmode STDOUT, ":gzip"; while(<$fh>) { # do stuff print; }
(worked for me on a simple task)

UPDATE: (2010-10-18) It seems that PerlIO::gzip should be viewed as superseded by PerlIO::via:gzip. (see PerlIO::gzip or PerlIO::via::gzip).