From: Paul Marquess Date: Thu, 16 Mar 2006 14:38:52 +0000 (+0000) Subject: Compress::Raw::Zlib, Compress::Zlib, IO::Compress::Zlib 2.000_10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cb7abd7f1d4048e97e3364ad103a4806dcf94905;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Compress/IO/Base/Changes b/ext/Compress/IO/Base/Changes index a3293e3..fa0d479 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 6f06827..cef3598 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 19669e2..567ed0b 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 dc6ea41..d35a9e0 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 a2c4df2..e39f1e8 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 13b187a..dab3b51 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 a677ed4..81fa6db 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 027592a..b56eb28 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 1413bc1..15fe35a 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 63eb728..4521f17 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 9bea284..10315aa 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 abcfee0..ebc200a 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 0fc8519..5732a30 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