in reply to read bytes from compressed file
Otherwise I've personally always used an external unzipper in a pipe:
open (my $handle,"gunzip -c $filename |" ) or die $!; [download]
Liz