summaryrefslogtreecommitdiff
path: root/cpan/IO-Compress/lib
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/IO-Compress/lib')
-rw-r--r--cpan/IO-Compress/lib/Compress/Zlib.pm12
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm4
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Base.pm4
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Base/Common.pm2
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Bzip2.pm10
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Deflate.pm10
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Gzip.pm12
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm2
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm12
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Zip.pm44
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm2
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm2
-rw-r--r--cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm4
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm18
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm34
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Base.pm6
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm10
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm14
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm8
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm10
-rw-r--r--cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm100
26 files changed, 198 insertions, 152 deletions
diff --git a/cpan/IO-Compress/lib/Compress/Zlib.pm b/cpan/IO-Compress/lib/Compress/Zlib.pm
index 0f3e4bced8..d4a56509e8 100644
--- a/cpan/IO-Compress/lib/Compress/Zlib.pm
+++ b/cpan/IO-Compress/lib/Compress/Zlib.pm
@@ -7,17 +7,17 @@ use Carp ;
use IO::Handle ;
use Scalar::Util qw(dualvar);
-use IO::Compress::Base::Common 2.027 ;
-use Compress::Raw::Zlib 2.027 ;
-use IO::Compress::Gzip 2.027 ;
-use IO::Uncompress::Gunzip 2.027 ;
+use IO::Compress::Base::Common 2.030 ;
+use Compress::Raw::Zlib 2.030 ;
+use IO::Compress::Gzip 2.030 ;
+use IO::Uncompress::Gunzip 2.030 ;
use strict ;
use warnings ;
use bytes ;
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = '2.027';
+$VERSION = '2.030';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -451,7 +451,7 @@ sub inflate
package Compress::Zlib ;
-use IO::Compress::Gzip::Constants 2.027 ;
+use IO::Compress::Gzip::Constants 2.030 ;
sub memGzip($)
{
diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
index 4cc969773f..7f13b158ee 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
@@ -4,13 +4,13 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
+use IO::Compress::Base::Common 2.030 qw(:Status);
#use Compress::Bzip2 ;
-use Compress::Raw::Bzip2 2.027 ;
+use Compress::Raw::Bzip2 2.030 ;
our ($VERSION);
-$VERSION = '2.027';
+$VERSION = '2.030';
sub mkCompObject
{
diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm
index 36a5dcd7b9..f586a6e7e6 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm
@@ -4,12 +4,12 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
+use IO::Compress::Base::Common 2.030 qw(:Status);
-use Compress::Raw::Zlib 2.027 qw(Z_OK Z_FINISH MAX_WBITS) ;
+use Compress::Raw::Zlib 2.030 qw(Z_OK Z_FINISH MAX_WBITS) ;
our ($VERSION);
-$VERSION = '2.027';
+$VERSION = '2.030';
sub mkCompObject
{
diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm
index e6d589e89f..e08ed496fe 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm
@@ -4,10 +4,10 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
+use IO::Compress::Base::Common 2.030 qw(:Status);
our ($VERSION);
-$VERSION = '2.027';
+$VERSION = '2.030';
sub mkCompObject
{
diff --git a/cpan/IO-Compress/lib/IO/Compress/Base.pm b/cpan/IO-Compress/lib/IO/Compress/Base.pm
index e47bdba5eb..ed9997d279 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Base.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Base.pm
@@ -6,7 +6,7 @@ require 5.004 ;
use strict ;
use warnings;
-use IO::Compress::Base::Common 2.027 ;
+use IO::Compress::Base::Common 2.030 ;
use IO::File ;
use Scalar::Util qw(blessed readonly);
@@ -20,7 +20,7 @@ use bytes;
our (@ISA, $VERSION);
@ISA = qw(Exporter IO::File);
-$VERSION = '2.027';
+$VERSION = '2.030';
#Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16.
diff --git a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm
index 5c776bb9c2..56f3741e3e 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm
@@ -11,7 +11,7 @@ use File::GlobMapper;
require Exporter;
our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE);
@ISA = qw(Exporter);
-$VERSION = '2.027';
+$VERSION = '2.030';
@EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput
isaFileGlobString cleanFileGlobString oneTarget
diff --git a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm
index 829e0defd4..2a4e041ce9 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm
@@ -5,16 +5,16 @@ use warnings;
use bytes;
require Exporter ;
-use IO::Compress::Base 2.027 ;
+use IO::Compress::Base 2.030 ;
-use IO::Compress::Base::Common 2.027 qw(createSelfTiedObject);
-use IO::Compress::Adapter::Bzip2 2.027 ;
+use IO::Compress::Base::Common 2.030 qw(createSelfTiedObject);
+use IO::Compress::Adapter::Bzip2 2.030 ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error);
-$VERSION = '2.027';
+$VERSION = '2.030';
$Bzip2Error = '';
@ISA = qw(Exporter IO::Compress::Base);
@@ -51,7 +51,7 @@ sub getExtraParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return (
'BlockSize100K' => [0, 1, Parse_unsigned, 1],
diff --git a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm
index be29fb1c9c..58b61ab26d 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm
@@ -6,16 +6,16 @@ use bytes;
require Exporter ;
-use IO::Compress::RawDeflate 2.027 ;
+use IO::Compress::RawDeflate 2.030 ;
-use Compress::Raw::Zlib 2.027 ;
-use IO::Compress::Zlib::Constants 2.027 ;
-use IO::Compress::Base::Common 2.027 qw(createSelfTiedObject);
+use Compress::Raw::Zlib 2.030 ;
+use IO::Compress::Zlib::Constants 2.030 ;
+use IO::Compress::Base::Common 2.030 qw(createSelfTiedObject);
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$DeflateError = '';
@ISA = qw(Exporter IO::Compress::RawDeflate);
diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm
index 01d4b14806..0e6ea994ec 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm
@@ -8,12 +8,12 @@ use warnings;
use bytes;
-use IO::Compress::RawDeflate 2.027 ;
+use IO::Compress::RawDeflate 2.030 ;
-use Compress::Raw::Zlib 2.027 ;
-use IO::Compress::Base::Common 2.027 qw(:Status :Parse createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.027 ;
-use IO::Compress::Zlib::Extra 2.027 ;
+use Compress::Raw::Zlib 2.030 ;
+use IO::Compress::Base::Common 2.030 qw(:Status :Parse createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.030 ;
+use IO::Compress::Zlib::Extra 2.030 ;
BEGIN
{
@@ -27,7 +27,7 @@ require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$GzipError = '' ;
@ISA = qw(Exporter IO::Compress::RawDeflate);
diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
index 0d57db64f1..335b7d918c 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
@@ -9,7 +9,7 @@ require Exporter;
our ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names);
our ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE);
-$VERSION = '2.027';
+$VERSION = '2.030';
@ISA = qw(Exporter);
diff --git a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
index 0acf43d917..bec40e0e55 100644
--- a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
@@ -7,16 +7,16 @@ use warnings;
use bytes;
-use IO::Compress::Base 2.027 ;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
-use IO::Compress::Adapter::Deflate 2.027 ;
+use IO::Compress::Base 2.030 ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
+use IO::Compress::Adapter::Deflate 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$RawDeflateError = '';
@ISA = qw(Exporter IO::Compress::Base);
@@ -142,8 +142,8 @@ sub getZlibParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.027 qw(:Parse);
- use Compress::Raw::Zlib 2.027 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
+ use Compress::Raw::Zlib 2.030 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
return (
diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip.pm b/cpan/IO-Compress/lib/IO/Compress/Zip.pm
index b235f7f3cc..00f4ed9fce 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Zip.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Zip.pm
@@ -4,26 +4,26 @@ use strict ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
-use IO::Compress::RawDeflate 2.027 ;
-use IO::Compress::Adapter::Deflate 2.027 ;
-use IO::Compress::Adapter::Identity 2.027 ;
-use IO::Compress::Zlib::Extra 2.027 ;
-use IO::Compress::Zip::Constants 2.027 ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
+use IO::Compress::RawDeflate 2.030 ;
+use IO::Compress::Adapter::Deflate 2.030 ;
+use IO::Compress::Adapter::Identity 2.030 ;
+use IO::Compress::Zlib::Extra 2.030 ;
+use IO::Compress::Zip::Constants 2.030 ;
-use Compress::Raw::Zlib 2.027 qw(crc32) ;
+use Compress::Raw::Zlib 2.030 qw(crc32) ;
BEGIN
{
eval { require IO::Compress::Adapter::Bzip2 ;
- import IO::Compress::Adapter::Bzip2 2.027 ;
+ import IO::Compress::Adapter::Bzip2 2.030 ;
require IO::Compress::Bzip2 ;
- import IO::Compress::Bzip2 2.027 ;
+ import IO::Compress::Bzip2 2.030 ;
} ;
# eval { require IO::Compress::Adapter::Lzma ;
# import IO::Compress::Adapter::Lzma 2.020 ;
# require IO::Compress::Lzma ;
-# import IO::Compress::Lzma 2.027 ;
+# import IO::Compress::Lzma 2.030 ;
# } ;
}
@@ -32,7 +32,7 @@ require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZipError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$ZipError = '';
@ISA = qw(Exporter IO::Compress::RawDeflate);
@@ -156,7 +156,7 @@ sub mkHeader
my $extFileAttr = 0 ;
# This code assumes Unix.
- $extFileAttr = 0666 << 16
+ $extFileAttr = 0100644 << 16
if $osCode == ZIP_OS_CODE_UNIX ;
if (*$self->{ZipData}{Zip64}) {
@@ -513,8 +513,8 @@ sub getExtraParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.027 qw(:Parse);
- use Compress::Raw::Zlib 2.027 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
+ use Compress::Raw::Zlib 2.030 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
my @Bzip2 = ();
@@ -540,7 +540,7 @@ sub getExtraParams
'exUnix2' => [0, 1, Parse_any, undef],
'ExtAttr' => [0, 1, Parse_any,
$Compress::Raw::Zlib::gzip_os_code == 3
- ? 0666 << 16
+ ? 0100644 << 16
: 0],
'OS_Code' => [0, 1, Parse_unsigned, $Compress::Raw::Zlib::gzip_os_code],
@@ -1058,15 +1058,21 @@ This parameter defaults to 0.
=item C<< Name => $string >>
-Stores the contents of C<$string> in the zip filename header field. If
-C<Name> is not specified, no zip filename field will be created.
+Stores the contents of C<$string> in the zip filename header field.
+
+If C<Name> is not specified and the C<$input> parameter is a filename that
+will be used for the zip filename header field.
+
+If C<Name> is not specified and the C<$input> parameter is not a filename,
+no zip filename field will be created.
=item C<< Time => $number >>
Sets the last modified time field in the zip header to $number.
This field defaults to the time the C<IO::Compress::Zip> object was created
-if this option is not specified.
+if this option is not specified and the C<$input> parameter is not a
+filename.
=item C<< ExtAttr => $attr >>
@@ -1075,7 +1081,7 @@ header of the zip file. This is a 4 byte field.
If you are running a Unix derivative this value defaults to
- 0666 << 16
+ 0100644 << 16
This should allow read/write access to any files that are extracted from
the zip file/buffer.
diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm
index 2166fb1fb5..e843c59946 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm
@@ -7,7 +7,7 @@ require Exporter;
our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS);
-$VERSION = '2.027';
+$VERSION = '2.030';
@ISA = qw(Exporter);
diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
index bc98dfff5b..af5aee5fa6 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
@@ -9,7 +9,7 @@ require Exporter;
our ($VERSION, @ISA, @EXPORT);
-$VERSION = '2.027';
+$VERSION = '2.030';
@ISA = qw(Exporter);
diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
index f36c86f85f..0c21887ba0 100644
--- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
+++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
@@ -8,9 +8,9 @@ use bytes;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = '2.027';
+$VERSION = '2.030';
-use IO::Compress::Gzip::Constants 2.027 ;
+use IO::Compress::Gzip::Constants 2.030 ;
sub ExtraFieldError
{
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
index a3253654b9..913a0a780b 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
@@ -4,12 +4,12 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
+use IO::Compress::Base::Common 2.030 qw(:Status);
-use Compress::Raw::Bzip2 2.027 ;
+use Compress::Raw::Bzip2 2.030 ;
our ($VERSION, @ISA);
-$VERSION = '2.027';
+$VERSION = '2.030';
sub mkUncompObject
{
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
index 2ba1a6266f..c4671dc5cc 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
@@ -4,13 +4,13 @@ use warnings;
use strict;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
+use IO::Compress::Base::Common 2.030 qw(:Status);
our ($VERSION);
-$VERSION = '2.027';
+$VERSION = '2.030';
-use Compress::Raw::Zlib 2.027 ();
+use Compress::Raw::Zlib 2.030 ();
sub mkUncompObject
{
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm
index 4dffd666f2..19788521de 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm
@@ -4,11 +4,11 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status);
-use Compress::Raw::Zlib 2.027 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
+use IO::Compress::Base::Common 2.030 qw(:Status);
+use Compress::Raw::Zlib 2.030 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
our ($VERSION);
-$VERSION = '2.027';
+$VERSION = '2.030';
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm
index 0d01f7b9cf..37d2b167e6 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm
@@ -6,22 +6,22 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(createSelfTiedObject);
+use IO::Compress::Base::Common 2.030 qw(createSelfTiedObject);
-use IO::Uncompress::Adapter::Inflate 2.027 ();
+use IO::Uncompress::Adapter::Inflate 2.030 ();
-use IO::Uncompress::Base 2.027 ;
-use IO::Uncompress::Gunzip 2.027 ;
-use IO::Uncompress::Inflate 2.027 ;
-use IO::Uncompress::RawInflate 2.027 ;
-use IO::Uncompress::Unzip 2.027 ;
+use IO::Uncompress::Base 2.030 ;
+use IO::Uncompress::Gunzip 2.030 ;
+use IO::Uncompress::Inflate 2.030 ;
+use IO::Uncompress::RawInflate 2.030 ;
+use IO::Uncompress::Unzip 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$AnyInflateError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
@@ -48,7 +48,7 @@ sub anyinflate
sub getExtraParams
{
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ;
}
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
index 206a0ed86a..c7d503152a 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
@@ -4,16 +4,16 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(createSelfTiedObject);
+use IO::Compress::Base::Common 2.030 qw(createSelfTiedObject);
-use IO::Uncompress::Base 2.027 ;
+use IO::Uncompress::Base 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$AnyUncompressError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
@@ -27,22 +27,22 @@ Exporter::export_ok_tags('all');
BEGIN
{
- eval ' use IO::Uncompress::Adapter::Inflate 2.027 ;';
- eval ' use IO::Uncompress::Adapter::Bunzip2 2.027 ;';
- eval ' use IO::Uncompress::Adapter::LZO 2.027 ;';
- eval ' use IO::Uncompress::Adapter::Lzf 2.027 ;';
+ eval ' use IO::Uncompress::Adapter::Inflate 2.030 ;';
+ eval ' use IO::Uncompress::Adapter::Bunzip2 2.030 ;';
+ eval ' use IO::Uncompress::Adapter::LZO 2.030 ;';
+ eval ' use IO::Uncompress::Adapter::Lzf 2.030 ;';
eval ' use IO::Uncompress::Adapter::UnLzma 2.020 ;';
eval ' use IO::Uncompress::Adapter::UnXz 2.020 ;';
- eval ' use IO::Uncompress::Bunzip2 2.027 ;';
- eval ' use IO::Uncompress::UnLzop 2.027 ;';
- eval ' use IO::Uncompress::Gunzip 2.027 ;';
- eval ' use IO::Uncompress::Inflate 2.027 ;';
- eval ' use IO::Uncompress::RawInflate 2.027 ;';
- eval ' use IO::Uncompress::Unzip 2.027 ;';
- eval ' use IO::Uncompress::UnLzf 2.027 ;';
- eval ' use IO::Uncompress::UnLzma 2.027 ;';
- eval ' use IO::Uncompress::UnXz 2.027 ;';
+ eval ' use IO::Uncompress::Bunzip2 2.030 ;';
+ eval ' use IO::Uncompress::UnLzop 2.030 ;';
+ eval ' use IO::Uncompress::Gunzip 2.030 ;';
+ eval ' use IO::Uncompress::Inflate 2.030 ;';
+ eval ' use IO::Uncompress::RawInflate 2.030 ;';
+ eval ' use IO::Uncompress::Unzip 2.030 ;';
+ eval ' use IO::Uncompress::UnLzf 2.030 ;';
+ eval ' use IO::Uncompress::UnLzma 2.030 ;';
+ eval ' use IO::Uncompress::UnXz 2.030 ;';
}
sub new
@@ -60,7 +60,7 @@ sub anyuncompress
sub getExtraParams
{
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ,
'UnLzma' => [1, 1, Parse_boolean, 0] ) ;
}
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm
index e73bb9d83b..2814163e2f 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm
@@ -9,12 +9,12 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS);
@ISA = qw(Exporter IO::File);
-$VERSION = '2.027';
+$VERSION = '2.030';
use constant G_EOF => 0 ;
use constant G_ERR => -1 ;
-use IO::Compress::Base::Common 2.027 ;
+use IO::Compress::Base::Common 2.030 ;
#use Parse::Parameters ;
use IO::File ;
@@ -980,7 +980,7 @@ sub gotoNextStream
#*$self->{EndStream} = 0 ;
if ( ! defined $magic) {
- if (! *$self->{Transparent} )
+ if (! *$self->{Transparent} || $self->eof())
{
*$self->{EndStream} = 1 ;
return 0;
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
index a96c0235e7..288ead181c 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
@@ -4,15 +4,15 @@ use strict ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Base 2.027 ;
-use IO::Uncompress::Adapter::Bunzip2 2.027 ;
+use IO::Uncompress::Base 2.030 ;
+use IO::Uncompress::Adapter::Bunzip2 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error);
-$VERSION = '2.027';
+$VERSION = '2.030';
$Bunzip2Error = '';
@ISA = qw( Exporter IO::Uncompress::Base );
@@ -40,7 +40,7 @@ sub getExtraParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return (
'Verbosity' => [1, 1, Parse_boolean, 0],
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm
index d13514101d..4b10f4bb28 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm
@@ -9,12 +9,12 @@ use strict ;
use warnings;
use bytes;
-use IO::Uncompress::RawInflate 2.027 ;
+use IO::Uncompress::RawInflate 2.030 ;
-use Compress::Raw::Zlib 2.027 qw( crc32 ) ;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.027 ;
-use IO::Compress::Zlib::Extra 2.027 ;
+use Compress::Raw::Zlib 2.030 qw( crc32 ) ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.030 ;
+use IO::Compress::Zlib::Extra 2.030 ;
require Exporter ;
@@ -28,7 +28,7 @@ Exporter::export_ok_tags('all');
$GunzipError = '';
-$VERSION = '2.027';
+$VERSION = '2.030';
sub new
{
@@ -47,7 +47,7 @@ sub gunzip
sub getExtraParams
{
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return ( 'ParseExtra' => [1, 1, Parse_boolean, 0] ) ;
}
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm
index 86abb50d60..27c1d8584d 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm
@@ -5,15 +5,15 @@ use strict ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
-use IO::Compress::Zlib::Constants 2.027 ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
+use IO::Compress::Zlib::Constants 2.030 ;
-use IO::Uncompress::RawInflate 2.027 ;
+use IO::Uncompress::RawInflate 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$InflateError = '';
@ISA = qw( Exporter IO::Uncompress::RawInflate );
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
index 609928fd4e..12e915b625 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
@@ -5,16 +5,16 @@ use strict ;
use warnings;
use bytes;
-use Compress::Raw::Zlib 2.027 ;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
+use Compress::Raw::Zlib 2.030 ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Base 2.027 ;
-use IO::Uncompress::Adapter::Inflate 2.027 ;
+use IO::Uncompress::Base 2.030 ;
+use IO::Uncompress::Adapter::Inflate 2.030 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError);
-$VERSION = '2.027';
+$VERSION = '2.030';
$RawInflateError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
index 17cc78d7b6..fe75213231 100644
--- a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
+++ b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
@@ -8,14 +8,14 @@ use strict ;
use warnings;
use bytes;
-use IO::Uncompress::RawInflate 2.027 ;
-use IO::Compress::Base::Common 2.027 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Adapter::Inflate 2.027 ;
-use IO::Uncompress::Adapter::Identity 2.027 ;
-use IO::Compress::Zlib::Extra 2.027 ;
-use IO::Compress::Zip::Constants 2.027 ;
+use IO::Uncompress::RawInflate 2.030 ;
+use IO::Compress::Base::Common 2.030 qw(:Status createSelfTiedObject);
+use IO::Uncompress::Adapter::Inflate 2.030 ;
+use IO::Uncompress::Adapter::Identity 2.030 ;
+use IO::Compress::Zlib::Extra 2.030 ;
+use IO::Compress::Zip::Constants 2.030 ;
-use Compress::Raw::Zlib 2.027 qw(crc32) ;
+use Compress::Raw::Zlib 2.030 qw(crc32) ;
BEGIN
{
@@ -30,7 +30,7 @@ require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup);
-$VERSION = '2.027';
+$VERSION = '2.030';
$UnzipError = '';
@ISA = qw(Exporter IO::Uncompress::RawInflate);
@@ -63,7 +63,7 @@ sub unzip
sub getExtraParams
{
- use IO::Compress::Base::Common 2.027 qw(:Parse);
+ use IO::Compress::Base::Common 2.030 qw(:Parse);
return (
@@ -1056,54 +1056,57 @@ C<InputLength> option.
=head2 Examples
-To read the contents of the file C<file1.txt.zip> and write the
-uncompressed data to the file C<file1.txt>.
+Say you have a zip file, C<file1.zip>, that only contains a
+single member, you can read it and write the uncompressed data to the
+file C<file1.txt> like this.
use strict ;
use warnings ;
use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
- my $input = "file1.txt.zip";
+ my $input = "file1.zip";
my $output = "file1.txt";
unzip $input => $output
or die "unzip failed: $UnzipError\n";
-To read from an existing Perl filehandle, C<$input>, and write the
-uncompressed data to a buffer, C<$buffer>.
+If you have a zip file that contains multiple members and want to read a
+specific member from the file, say C<"data1">, use the C<Name> option
use strict ;
use warnings ;
use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
- use IO::File ;
- my $input = new IO::File "<file1.txt.zip"
- or die "Cannot open 'file1.txt.zip': $!\n" ;
- my $buffer ;
- unzip $input => \$buffer
+ my $input = "file1.zip";
+ my $output = "file1.txt";
+ unzip $input => $output, Name => "data1"
or die "unzip failed: $UnzipError\n";
-To uncompress all files in the directory "/my/home" that match "*.txt.zip" and store the compressed data in the same directory
+Alternatively, if you want to read the C<"data1"> member into memory, use
+a scalar reference for the C<output> partameter.
use strict ;
use warnings ;
use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
- unzip '</my/home/*.txt.zip>' => '</my/home/#1.txt>'
+ my $input = "file1.zip";
+ my $output ;
+ unzip $input => \$output, Name => "data1"
or die "unzip failed: $UnzipError\n";
+ # $output now contains the uncompressed data
-and if you want to compress each file one at a time, this will do the trick
+To read from an existing Perl filehandle, C<$input>, and write the
+uncompressed data to a buffer, C<$buffer>.
use strict ;
use warnings ;
use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
+ use IO::File ;
- for my $input ( glob "/my/home/*.txt.zip" )
- {
- my $output = $input;
- $output =~ s/.zip// ;
- unzip $input => $output
- or die "Error compressing '$input': $UnzipError\n";
- }
+ my $input = new IO::File "<file1.zip"
+ or die "Cannot open 'file1.zip': $!\n" ;
+ my $buffer ;
+ unzip $input => \$buffer
+ or die "unzip failed: $UnzipError\n";
=head1 OO Interface
@@ -1165,7 +1168,7 @@ OPTS is a combination of the following options:
=item C<< Name => "membername" >>
-Create "membername" in the zip file.
+Open "membername" from the zip file for reading.
=item C<< AutoClose => 0|1 >>
@@ -1513,6 +1516,43 @@ Same as doing this
See L<IO::Uncompress::Unzip::FAQ|IO::Uncompress::Unzip::FAQ/"Compressed files and Net::FTP">
+=head2 Walking through a zip file
+
+The code below can be used to traverse a zip file, one compressed data
+stream at a time.
+
+ use IO::Uncompress::Unzip qw($UnzipError);
+
+ my $zipfile = "somefile.zip";
+ my $u = new IO::Uncompress::Unzip $zipfile
+ or die "Cannot open $zipfile: $UnzipError";
+
+ my $status;
+ for ($status = 1; ! $u->eof(); $status = $u->nextStream())
+ {
+
+ my $name = $u->getHeaderInfo()->{Name};
+ warn "Processing member $name\n" ;
+
+ my $buff;
+ while (($status = $u->read($buff)) > 0) {
+ # Do something here
+ }
+
+ last if $status < 0;
+ }
+
+ die "Error processing $zipfile: $!\n"
+ if $status < 0 ;
+
+Each individual compressed data stream is read until the logical
+end-of-file is reached. Then C<nextStream> is called. This will skip to the
+start of the next compressed data stream and clear the end-of-file flag.
+
+It is also worth noting that C<nextStream> can be called at any time -- you
+don't have to wait until you have exhausted a compressed data stream before
+skipping to the next one.
+
=head1 SEE ALSO
L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>