From cb7abd7f1d4048e97e3364ad103a4806dcf94905 Mon Sep 17 00:00:00 2001 From: Paul Marquess Date: Thu, 16 Mar 2006 14:38:52 +0000 Subject: Compress::Raw::Zlib, Compress::Zlib, IO::Compress::Zlib 2.000_10 From: "Paul Marquess" Message-ID: <009401c64907$5a6ed710$4c05140a@myopwv.com> p4raw-id: //depot/perl@27516 --- ext/Compress/IO/Base/Changes | 9 +++ ext/Compress/IO/Base/README | 6 +- ext/Compress/IO/Base/lib/IO/Compress/Base.pm | 9 +-- .../IO/Base/lib/IO/Compress/Base/Common.pm | 2 +- .../IO/Base/lib/IO/Uncompress/AnyUncompress.pm | 81 ++++++++++++++-------- ext/Compress/IO/Base/lib/IO/Uncompress/Base.pm | 9 +-- ext/Compress/IO/Zlib/Changes | 8 +++ ext/Compress/IO/Zlib/Makefile.PL | 1 + ext/Compress/IO/Zlib/README | 8 +-- .../IO/Zlib/lib/IO/Compress/Adapter/Deflate.pm | 2 +- .../IO/Zlib/lib/IO/Compress/Adapter/Identity.pm | 2 +- ext/Compress/IO/Zlib/lib/IO/Compress/Deflate.pm | 15 ++-- ext/Compress/IO/Zlib/lib/IO/Compress/Gzip.pm | 25 ++----- .../IO/Zlib/lib/IO/Compress/Gzip/Constants.pm | 2 +- ext/Compress/IO/Zlib/lib/IO/Compress/RawDeflate.pm | 15 ++-- ext/Compress/IO/Zlib/lib/IO/Compress/Zip.pm | 26 +++---- .../IO/Zlib/lib/IO/Compress/Zip/Constants.pm | 2 +- .../IO/Zlib/lib/IO/Compress/Zlib/Constants.pm | 2 +- .../IO/Zlib/lib/IO/Uncompress/Adapter/Identity.pm | 2 +- .../IO/Zlib/lib/IO/Uncompress/Adapter/Inflate.pm | 2 +- .../IO/Zlib/lib/IO/Uncompress/AnyInflate.pm | 34 ++++++--- ext/Compress/IO/Zlib/lib/IO/Uncompress/Gunzip.pm | 16 ++--- ext/Compress/IO/Zlib/lib/IO/Uncompress/Inflate.pm | 16 ++--- .../IO/Zlib/lib/IO/Uncompress/RawInflate.pm | 16 ++--- ext/Compress/IO/Zlib/lib/IO/Uncompress/Unzip.pm | 16 ++--- ext/Compress/IO/Zlib/t/010examples.t | 4 +- ext/Compress/IO/Zlib/t/050interop-gzip.t | 34 +++++---- ext/Compress/Raw/Zlib/Makefile.PL | 3 +- ext/Compress/Raw/Zlib/README | 5 +- ext/Compress/Raw/Zlib/Zlib.xs | 3 +- ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm | 9 +-- ext/Compress/Raw/Zlib/t/02zlib.t | 13 +++- ext/Compress/Zlib/Changes | 13 +++- ext/Compress/Zlib/Makefile.PL | 12 ++-- ext/Compress/Zlib/README | 4 +- ext/Compress/Zlib/examples/gzcat | 7 +- ext/Compress/Zlib/examples/gzstream | 3 +- ext/Compress/Zlib/lib/Compress/Zlib.pm | 16 ++--- ext/Compress/Zlib/t/14gzopen.t | 10 ++- 39 files changed, 250 insertions(+), 212 deletions(-) (limited to 'ext/Compress') diff --git a/ext/Compress/IO/Base/Changes b/ext/Compress/IO/Base/Changes index a3293e3941..fa0d47918f 100644 --- a/ext/Compress/IO/Base/Changes +++ b/ext/Compress/IO/Base/Changes @@ -1,6 +1,15 @@ CHANGES ------- + 2.000_10 13 March 2006 + + * AnyUncompress doesn't assume that IO-Compress-Zlib is installed any + more. + + 2.000_09 3 March 2006 + + * Released to CPAN. + 2.000_08 2 March 2006 * Split IO::Compress::Base into its own distribution. diff --git a/ext/Compress/IO/Base/README b/ext/Compress/IO/Base/README index 6f06827f70..cef35988e4 100644 --- a/ext/Compress/IO/Base/README +++ b/ext/Compress/IO/Base/README @@ -1,9 +1,9 @@ IO::Compress::Base - Version 2.000_08 + Version 2.000_10 - 27 Feb 2006 + 13 Mar 2006 Copyright (c) 2005-2006 Paul Marquess. All rights reserved. @@ -23,7 +23,7 @@ DESCRIPTION ----------- -This module is a base class for all IO::Compress and IO::Uncompress +This module is the base class for all IO::Compress and IO::Uncompress modules. diff --git a/ext/Compress/IO/Base/lib/IO/Compress/Base.pm b/ext/Compress/IO/Base/lib/IO/Compress/Base.pm index 19669e2ada..567ed0b85a 100644 --- a/ext/Compress/IO/Base/lib/IO/Compress/Base.pm +++ b/ext/Compress/IO/Base/lib/IO/Compress/Base.pm @@ -20,7 +20,7 @@ use bytes; our (@ISA, $VERSION, $got_encode); #@ISA = qw(Exporter IO::File); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; #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. @@ -968,13 +968,9 @@ L - - - =head1 AUTHOR -The I module was written by Paul Marquess, -F. +This module was written by Paul Marquess, F. @@ -983,7 +979,6 @@ F. See the Changes file. =head1 COPYRIGHT AND LICENSE - Copyright (c) 2005-2006 Paul Marquess. All rights reserved. diff --git a/ext/Compress/IO/Base/lib/IO/Compress/Base/Common.pm b/ext/Compress/IO/Base/lib/IO/Compress/Base/Common.pm index dc6ea418da..d35a9e02fc 100644 --- a/ext/Compress/IO/Base/lib/IO/Compress/Base/Common.pm +++ b/ext/Compress/IO/Base/lib/IO/Compress/Base/Common.pm @@ -11,7 +11,7 @@ use File::GlobMapper; require Exporter; our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS); @ISA = qw(Exporter); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; @EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput isaFileGlobString cleanFileGlobString oneTarget diff --git a/ext/Compress/IO/Base/lib/IO/Uncompress/AnyUncompress.pm b/ext/Compress/IO/Base/lib/IO/Uncompress/AnyUncompress.pm index a2c4df240a..e39f1e8ac0 100644 --- a/ext/Compress/IO/Base/lib/IO/Uncompress/AnyUncompress.pm +++ b/ext/Compress/IO/Base/lib/IO/Uncompress/AnyUncompress.pm @@ -6,25 +6,27 @@ use bytes; use IO::Compress::Base::Common qw(createSelfTiedObject); -#use IO::Uncompress::Base ; -use IO::Uncompress::Gunzip ; -use IO::Uncompress::Inflate ; -use IO::Uncompress::RawInflate ; -use IO::Uncompress::Unzip ; +use IO::Uncompress::Base ; BEGIN { + eval { require IO::Uncompress::Adapter::Inflate; import IO::Uncompress::Adapter::Inflate }; eval { require IO::Uncompress::Adapter::Bunzip2; import IO::Uncompress::Adapter::Bunzip2 }; - eval { require IO::Uncompress::Adapter::LZO; import IO::Uncompress::Adapter::LZO }; - eval { require IO::Uncompress::Bunzip2; import IO::Uncompress::Bunzip2 }; - eval { require IO::Uncompress::UnLzop; import IO::Uncompress::UnLzop }; + eval { require IO::Uncompress::Adapter::LZO; import IO::Uncompress::Adapter::LZO }; + + eval { require IO::Uncompress::Bunzip2; import IO::Uncompress::Bunzip2 }; + eval { require IO::Uncompress::UnLzop; import IO::Uncompress::UnLzop }; + eval { require IO::Uncompress::Gunzip; import IO::Uncompress::Gunzip }; + eval { require IO::Uncompress::Inflate; import IO::Uncompress::Inflate }; + eval { require IO::Uncompress::RawInflate; import IO::Uncompress::RawInflate }; + eval { require IO::Uncompress::Unzip; import IO::Uncompress::Unzip }; } require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; $AnyUncompressError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -72,21 +74,26 @@ sub mkUncomp my $class = shift ; my $got = shift ; + my $magic ; + # try zlib first - my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject(); + if (defined $IO::Uncompress::RawInflate::VERSION ) + { + my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject(); - return $self->saveErrorString(undef, $errstr, $errno) - if ! defined $obj; + return $self->saveErrorString(undef, $errstr, $errno) + if ! defined $obj; - *$self->{Uncomp} = $obj; - - my $magic = $self->ckMagic( qw( RawInflate Inflate Gunzip Unzip ) ); + *$self->{Uncomp} = $obj; + + $magic = $self->ckMagic( qw( RawInflate Inflate Gunzip Unzip ) ); - if ($magic) { - *$self->{Info} = $self->readHeader($magic) - or return undef ; + if ($magic) { + *$self->{Info} = $self->readHeader($magic) + or return undef ; - return 1; + return 1; + } } #foreach my $type ( qw( Bunzip2 UnLzop ) ) { @@ -158,7 +165,7 @@ __END__ =head1 NAME -IO::Uncompress::AnyUncompress - Perl interface to read 1950, 1951 & 1952 files/buffers +IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer =head1 SYNOPSIS @@ -225,11 +232,32 @@ B. - This module provides a Perl interface that allows the reading of -any files/buffers. +files/buffers that have been compressed with a variety of compression +libraries. + +The formats supported are: + +=over 5 + +=item RFC 1950 + +=item RFC 1951 + +=item gzip (RFC 1952) + +=item zip + +=item bzip2 + +=item lzop + +=back + +The module will auto-detect which, if any, of the supported +compression formats is being used. + -For writing 1950, 1951 & 1952 files/buffers, see the companion module IO::Compress::RawDeflate. @@ -881,13 +909,9 @@ L - - - =head1 AUTHOR -The I module was written by Paul Marquess, -F. +This module was written by Paul Marquess, F. @@ -896,7 +920,6 @@ F. See the Changes file. =head1 COPYRIGHT AND LICENSE - Copyright (c) 2005-2006 Paul Marquess. All rights reserved. diff --git a/ext/Compress/IO/Base/lib/IO/Uncompress/Base.pm b/ext/Compress/IO/Base/lib/IO/Uncompress/Base.pm index 13b187a7ad..dab3b51bc9 100644 --- a/ext/Compress/IO/Base/lib/IO/Uncompress/Base.pm +++ b/ext/Compress/IO/Base/lib/IO/Uncompress/Base.pm @@ -10,7 +10,7 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter ); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; @@ -1316,13 +1316,9 @@ L - - - =head1 AUTHOR -The I module was written by Paul Marquess, -F. +This module was written by Paul Marquess, F. @@ -1331,7 +1327,6 @@ F. See the Changes file. =head1 COPYRIGHT AND LICENSE - Copyright (c) 2005-2006 Paul Marquess. All rights reserved. diff --git a/ext/Compress/IO/Zlib/Changes b/ext/Compress/IO/Zlib/Changes index a677ed4a50..81fa6db79a 100644 --- a/ext/Compress/IO/Zlib/Changes +++ b/ext/Compress/IO/Zlib/Changes @@ -1,6 +1,14 @@ CHANGES ------- + 2.000_10 13 March 2006 + + * Documentation updates. + + 2.000_09 3 March 2006 + + * Released to CPAN. + 2.000_08 2 March 2006 * Split IO::Compress::Zlib into its own distribution. diff --git a/ext/Compress/IO/Zlib/Makefile.PL b/ext/Compress/IO/Zlib/Makefile.PL index 027592a8c9..b56eb2869f 100644 --- a/ext/Compress/IO/Zlib/Makefile.PL +++ b/ext/Compress/IO/Zlib/Makefile.PL @@ -23,6 +23,7 @@ WriteMakefile( ? (MAN3PODS => {}) : (PREREQ_PM => { 'Compress::Raw::Zlib' => 0, 'IO::Compress::Base' => 0, + 'IO::Uncompress::Base' => 0, $] >= 5.005 && $] < 5.006 ? ('File::BSDGlob' => 0) : () } diff --git a/ext/Compress/IO/Zlib/README b/ext/Compress/IO/Zlib/README index 1413bc1c10..15fe35aa8d 100644 --- a/ext/Compress/IO/Zlib/README +++ b/ext/Compress/IO/Zlib/README @@ -1,9 +1,9 @@ IO::Compress::Zlib - Version 2.000_08 + Version 2.000_10 - 27 Feb 2006 + 13 Mar 2006 Copyright (c) 2005-2006 Paul Marquess. All rights reserved. @@ -23,7 +23,7 @@ DESCRIPTION ----------- -This module provides a Perl interface to allow reading an writing of RFC +This module provides a Perl interface to allow reading and writing of RFC 1950, 1951, 1952 (i.e. gzip) and zip files/buffers. @@ -79,7 +79,7 @@ TROUBLESHOOTING -The t/17isize Test Suite +The t/020isize Test Suite ------------------------ This test suite checks that IO::Compress::Zlib can cope with gzip files diff --git a/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Deflate.pm b/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Deflate.pm index 63eb728932..4521f17542 100644 --- a/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Deflate.pm +++ b/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Deflate.pm @@ -9,7 +9,7 @@ use IO::Compress::Base::Common qw(:Status); use Compress::Raw::Zlib qw(Z_OK Z_FINISH MAX_WBITS) ; our ($VERSION); -$VERSION = '2.000_05'; +$VERSION = '2.000_10'; sub mkCompObject { diff --git a/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Identity.pm b/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Identity.pm index 9bea284722..10315aafe7 100644 --- a/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Identity.pm +++ b/ext/Compress/IO/Zlib/lib/IO/Compress/Adapter/Identity.pm @@ -8,7 +8,7 @@ use IO::Compress::Base::Common qw(:Status); use Compress::Raw::Zlib () ; our ($VERSION); -$VERSION = '2.000_05'; +$VERSION = '2.000_10'; sub mkCompObject { diff --git a/ext/Compress/IO/Zlib/lib/IO/Compress/Deflate.pm b/ext/Compress/IO/Zlib/lib/IO/Compress/Deflate.pm index abcfee01e7..ebc200a6f6 100644 --- a/ext/Compress/IO/Zlib/lib/IO/Compress/Deflate.pm +++ b/ext/Compress/IO/Zlib/lib/IO/Compress/Deflate.pm @@ -15,7 +15,7 @@ use IO::Compress::Base::Common qw(createSelfTiedObject); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; $DeflateError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); @@ -167,7 +167,9 @@ __END__ =head1 NAME -IO::Compress::Deflate - Perl interface to write RFC 1950 files/buffers + +IO::Compress::Deflate - Write RFC 1950 files/buffers + =head1 SYNOPSIS @@ -573,7 +575,7 @@ This parameter defaults to 0. -=item -Merge =E 0|1 +=item Merge =E 0|1 This option is used to compress input data and append it to an existing compressed data stream in C<$output>. The end result is a single compressed @@ -988,13 +990,9 @@ The primary site for gzip is F. - - - =head1 AUTHOR -The I module was written by Paul Marquess, -F. +This module was written by Paul Marquess, F. @@ -1003,7 +1001,6 @@ F. See the Changes file. =head1 COPYRIGHT AND LICENSE - Copyright (c) 2005-2006 Paul Marquess. All rights reserved. diff --git a/ext/Compress/IO/Zlib/lib/IO/Compress/Gzip.pm b/ext/Compress/IO/Zlib/lib/IO/Compress/Gzip.pm index 0fc8519852..5732a309be 100644 --- a/ext/Compress/IO/Zlib/lib/IO/Compress/Gzip.pm +++ b/ext/Compress/IO/Zlib/lib/IO/Compress/Gzip.pm @@ -26,7 +26,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError); -$VERSION = '2.000_08'; +$VERSION = '2.000_10'; $GzipError = '' ; @ISA = qw(Exporter IO::Compress::RawDeflate); @@ -429,7 +429,9 @@ __END__ =head1 NAME -IO::Compress::Gzip - Perl interface to write RFC 1952 files/buffers + +IO::Compress::Gzip - Write RFC 1952 files/buffers + =head1 SYNOPSIS @@ -591,16 +593,8 @@ See L for more details. If the C<$input> parameter is any other type, C will be returned. - In addition, if C<$input> is a simple filename, the default values for -a number of the gzip header fields created by this function will -be sourced from that file -- - -the NAME gzip header field will be populated with -the filename itself, and the MTIME header field will be set to the -modification time of the file. -The intention here is to mirror part of the behaviour of the gzip -executable. +the C and C