use Compress::Zlib;
my $buffer = sub_to_laod_a_file ( "gzip compressed file" );
my $out = uncompress ( $buffer );
$buffer contains the compressed file,
but $out has 0 byte length.
What's wrong?
these methods are intended for ZLIB Compressed Data Format Specification [ietf.org] (RFC-1950) and you probably want something that works for GZIP file format specification [ietf.org] (RFC-1952).
GZIP INTERFACE [search.cpan.org]:
Compress::Zlib::memGunzip [search.cpan.org]
try using this instead;
$out = Compress::Zlib::memGunzip($buffer) ;