/usr/share/perl5/Furl/ZlibStream.pm is in libfurl-perl 3.08-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | package Furl::ZlibStream;
# internal class.
use strict;
use warnings;
use overload '.=' => 'append', fallback => 1;
use Carp ();
use Compress::Raw::Zlib qw(Z_OK Z_STREAM_END);
sub new {
my ( $class, $buffer ) = @_;
my ( $zlib, $status ) = Compress::Raw::Zlib::Inflate->new(
-WindowBits => Compress::Raw::Zlib::WANT_GZIP_OR_ZLIB(), );
$status == Z_OK
or Carp::croak("Cannot initialize zlib: $status");
bless { buffer => $buffer, zlib => $zlib }, $class;
}
sub append {
my ( $self, $partial ) = @_;
my $status = $self->{zlib}->inflate( $partial, \my $deflated );
($status == Z_OK or $status == Z_STREAM_END)
or Carp::croak("Uncompress error: $status");
$self->{buffer} .= $deflated;
return $self;
}
sub get_response_string { ref $_[0]->{buffer} ? undef : $_[0]->{buffer} }
1;
|