summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm65
1 files changed, 32 insertions, 33 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm
index 6e57e96118..54757132a6 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm
@@ -9,12 +9,12 @@ use strict ;
use warnings;
use bytes;
-use IO::Uncompress::RawInflate 2.093 ;
+use IO::Uncompress::RawInflate 2.101 ;
-use Compress::Raw::Zlib 2.093 () ;
-use IO::Compress::Base::Common 2.093 qw(:Status );
-use IO::Compress::Gzip::Constants 2.093 ;
-use IO::Compress::Zlib::Extra 2.093 ;
+use Compress::Raw::Zlib 2.101 () ;
+use IO::Compress::Base::Common 2.101 qw(:Status );
+use IO::Compress::Gzip::Constants 2.101 ;
+use IO::Compress::Zlib::Extra 2.101 ;
require Exporter ;
@@ -28,7 +28,7 @@ Exporter::export_ok_tags('all');
$GunzipError = '';
-$VERSION = '2.093';
+$VERSION = '2.102';
sub new
{
@@ -70,9 +70,9 @@ sub ckMagic
*$self->{HeaderPending} = $magic ;
- return $self->HeaderError("Minimum header size is " .
- GZIP_MIN_HEADER_SIZE . " bytes")
- if length $magic != GZIP_ID_SIZE ;
+ return $self->HeaderError("Minimum header size is " .
+ GZIP_MIN_HEADER_SIZE . " bytes")
+ if length $magic != GZIP_ID_SIZE ;
return $self->HeaderError("Bad Magic")
if ! isGzipMagic($magic) ;
@@ -95,10 +95,10 @@ sub chkTrailer
my $self = shift;
my $trailer = shift;
- # Check CRC & ISIZE
+ # Check CRC & ISIZE
my ($CRC32, $ISIZE) = unpack("V V", $trailer) ;
- *$self->{Info}{CRC32} = $CRC32;
- *$self->{Info}{ISIZE} = $ISIZE;
+ *$self->{Info}{CRC32} = $CRC32;
+ *$self->{Info}{ISIZE} = $ISIZE;
if (*$self->{Strict}) {
return $self->TrailerError("CRC mismatch")
@@ -130,9 +130,9 @@ sub _readFullGzipHeader($)
*$self->{HeaderPending} = $magic ;
- return $self->HeaderError("Minimum header size is " .
- GZIP_MIN_HEADER_SIZE . " bytes")
- if length $magic != GZIP_ID_SIZE ;
+ return $self->HeaderError("Minimum header size is " .
+ GZIP_MIN_HEADER_SIZE . " bytes")
+ if length $magic != GZIP_ID_SIZE ;
return $self->HeaderError("Bad Magic")
@@ -150,7 +150,7 @@ sub _readGzipHeader($)
my ($buffer) = '' ;
$self->smartReadExact(\$buffer, GZIP_MIN_HEADER_SIZE - GZIP_ID_SIZE)
- or return $self->HeaderError("Minimum header size is " .
+ or return $self->HeaderError("Minimum header size is " .
GZIP_MIN_HEADER_SIZE . " bytes") ;
my $keep = $magic . $buffer ;
@@ -159,22 +159,22 @@ sub _readGzipHeader($)
# now split out the various parts
my ($cm, $flag, $mtime, $xfl, $os) = unpack("C C V C C", $buffer) ;
- $cm == GZIP_CM_DEFLATED
+ $cm == GZIP_CM_DEFLATED
or return $self->HeaderError("Not Deflate (CM is $cm)") ;
# check for use of reserved bits
return $self->HeaderError("Use of Reserved Bits in FLG field.")
- if $flag & GZIP_FLG_RESERVED ;
+ if $flag & GZIP_FLG_RESERVED ;
my $EXTRA ;
my @EXTRA = () ;
if ($flag & GZIP_FLG_FEXTRA) {
$EXTRA = "" ;
- $self->smartReadExact(\$buffer, GZIP_FEXTRA_HEADER_SIZE)
+ $self->smartReadExact(\$buffer, GZIP_FEXTRA_HEADER_SIZE)
or return $self->TruncatedHeader("FEXTRA Length") ;
my ($XLEN) = unpack("v", $buffer) ;
- $self->smartReadExact(\$EXTRA, $XLEN)
+ $self->smartReadExact(\$EXTRA, $XLEN)
or return $self->TruncatedHeader("FEXTRA Body");
$keep .= $buffer . $EXTRA ;
@@ -190,10 +190,10 @@ sub _readGzipHeader($)
if ($flag & GZIP_FLG_FNAME) {
$origname = "" ;
while (1) {
- $self->smartReadExact(\$buffer, 1)
+ $self->smartReadExact(\$buffer, 1)
or return $self->TruncatedHeader("FNAME");
last if $buffer eq GZIP_NULL_BYTE ;
- $origname .= $buffer
+ $origname .= $buffer
}
$keep .= $origname . GZIP_NULL_BYTE ;
@@ -205,10 +205,10 @@ sub _readGzipHeader($)
if ($flag & GZIP_FLG_FCOMMENT) {
$comment = "";
while (1) {
- $self->smartReadExact(\$buffer, 1)
+ $self->smartReadExact(\$buffer, 1)
or return $self->TruncatedHeader("FCOMMENT");
last if $buffer eq GZIP_NULL_BYTE ;
- $comment .= $buffer
+ $comment .= $buffer
}
$keep .= $comment . GZIP_NULL_BYTE ;
@@ -217,7 +217,7 @@ sub _readGzipHeader($)
}
if ($flag & GZIP_FLG_FHCRC) {
- $self->smartReadExact(\$buffer, GZIP_FHCRC_SIZE)
+ $self->smartReadExact(\$buffer, GZIP_FHCRC_SIZE)
or return $self->TruncatedHeader("FHCRC");
$HeaderCRC = unpack("v", $buffer) ;
@@ -254,7 +254,7 @@ sub _readGzipHeader($)
'Comment' => $comment,
'Time' => $mtime,
'OsID' => $os,
- 'OsName' => defined $GZIP_OS_Names{$os}
+ 'OsName' => defined $GZIP_OS_Names{$os}
? $GZIP_OS_Names{$os} : "Unknown",
'HeaderCRC' => $HeaderCRC,
'Flags' => $flag,
@@ -286,7 +286,7 @@ IO::Uncompress::Gunzip - Read RFC 1952 files/buffers
my $status = gunzip $input => $output [,OPTS]
or die "gunzip failed: $GunzipError\n";
- my $z = new IO::Uncompress::Gunzip $input [OPTS]
+ my $z = IO::Uncompress::Gunzip->new( $input [OPTS] )
or die "gunzip failed: $GunzipError\n";
$status = $z->read($buffer)
@@ -579,7 +579,7 @@ uncompressed data to a buffer, C<$buffer>.
use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ;
use IO::File ;
- my $input = new IO::File "<file1.txt.gz"
+ my $input = IO::File->new( "<file1.txt.gz" )
or die "Cannot open 'file1.txt.gz': $!\n" ;
my $buffer ;
gunzip $input => \$buffer
@@ -614,7 +614,7 @@ and if you want to compress each file one at a time, this will do the trick
The format of the constructor for IO::Uncompress::Gunzip is shown below
- my $z = new IO::Uncompress::Gunzip $input [OPTS]
+ my $z = IO::Uncompress::Gunzip->new( $input [OPTS] )
or die "IO::Uncompress::Gunzip failed: $GunzipError\n";
Returns an C<IO::Uncompress::Gunzip> object on success and undef on failure.
@@ -1064,7 +1064,7 @@ C<InputLength> option in the constructor.
=head1 Importing
-No symbolic constants are required by this IO::Uncompress::Gunzip at present.
+No symbolic constants are required by IO::Uncompress::Gunzip at present.
=over 5
@@ -1085,7 +1085,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP">
=head1 SUPPORT
-General feedback/questions/bug reports should be sent to
+General feedback/questions/bug reports should be sent to
L<https://github.com/pmqs/IO-Compress/issues> (preferred) or
L<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.
@@ -1122,8 +1122,7 @@ See the Changes file.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2005-2019 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2021 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
-