diff --git a/MANIFEST b/MANIFEST index c214882cebce..76e8c1d0b058 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1007,6 +1007,7 @@ cpan/HTTP-Tiny/t/170_keepalive.t cpan/HTTP-Tiny/t/BrokenCookieJar.pm cpan/HTTP-Tiny/t/SimpleCookieJar.pm cpan/HTTP-Tiny/t/Util.pm +cpan/IO-Compress/bin/streamzip cpan/IO-Compress/bin/zipdetails IO::Compress cpan/IO-Compress/lib/Compress/Zlib.pm IO::Compress cpan/IO-Compress/lib/File/GlobMapper.pm IO::Compress @@ -1138,6 +1139,9 @@ cpan/IO-Compress/t/cz-06gzsetp.t IO::Compress cpan/IO-Compress/t/cz-08encoding.t IO::Compress cpan/IO-Compress/t/cz-14gzopen.t IO::Compress cpan/IO-Compress/t/files/bad-efs.zip +cpan/IO-Compress/t/files/encrypt-aes.zip +cpan/IO-Compress/t/files/encrypt-standard.zip +cpan/IO-Compress/t/files/jar.zip cpan/IO-Compress/t/files/meta.xml cpan/IO-Compress/t/files/test.ods cpan/IO-Compress/t/globmapper.t IO::Compress @@ -6178,6 +6182,7 @@ utils/ptardiff.PL The ptardiff utility utils/ptargrep.PL The ptargrep utility utils/shasum.PL filter for computing SHA digests (analogous to md5sum) utils/splain.PL Stand-alone version of diagnostics.pm +utils/streamzip.PL utils/xsubpp.PL External subroutine preprocessor utils/zipdetails.PL display the internal structure of zip files vms/descrip_mms.template Template MM[SK] description file for build diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 38fd2bd13772..68b6fa6aec14 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -626,7 +626,7 @@ package Maintainers; }, 'IO-Compress' => { - 'DISTRIBUTION' => 'PMQS/IO-Compress-2.087.tar.gz', + 'DISTRIBUTION' => 'PMQS/IO-Compress-2.089.tar.gz', 'FILES' => q[cpan/IO-Compress], 'EXCLUDED' => [ qr{^examples/}, diff --git a/cpan/IO-Compress/Makefile.PL b/cpan/IO-Compress/Makefile.PL index 093b17aa784b..7d69cf0ce333 100644 --- a/cpan/IO-Compress/Makefile.PL +++ b/cpan/IO-Compress/Makefile.PL @@ -3,7 +3,7 @@ use strict ; require 5.006 ; -$::VERSION = '2.087' ; +$::VERSION = '2.089' ; use lib '.'; use private::MakeUtil; @@ -42,7 +42,7 @@ WriteMakefile( INSTALLDIRS => ($] >= 5.009 && $] < 5.011 ? 'perl' : 'site'), - EXE_FILES => ['bin/zipdetails'], + EXE_FILES => ['bin/zipdetails', 'bin/streamzip'], ( $] >= 5.009 && $] <= 5.011001 && ! $ENV{PERL_CORE} diff --git a/cpan/IO-Compress/bin/streamzip b/cpan/IO-Compress/bin/streamzip new file mode 100644 index 000000000000..ba8ab3f3e672 --- /dev/null +++ b/cpan/IO-Compress/bin/streamzip @@ -0,0 +1,212 @@ +#!/usr/bin/perl + +# Streaming zip + +use strict; +use warnings; + +use IO::Compress::Zip qw(zip + ZIP_CM_STORE + ZIP_CM_DEFLATE + ZIP_CM_BZIP2 + ZIP_CM_LZMA ); +use Getopt::Long; + +my $VERSION = '1.0'; + +my $compression_method = ZIP_CM_DEFLATE; +my $stream = 0; +my $zipfile = '-'; +my $memberName = '-' ; +my $zip64 = 0 ; + +GetOptions("zip64" => \$zip64, + "method=s" => \&lookupMethod, + "stream" => \$stream, + "zipfile=s" => \$zipfile, + "member-name=s" => \$memberName, + 'version' => sub { print "$VERSION\n"; exit 0 }, + 'help' => \&Usage, + ) + or Usage(); + +Usage() + if @ARGV; + + +zip '-' => $zipfile, + Name => $memberName, + Zip64 => $zip64, + Method => $compression_method, + Stream => $stream + or die "Error creating zip file '$zipfile': $\n" ; + +exit 0; + +sub lookupMethod +{ + my $name = shift; + my $value = shift ; + + my %valid = ( store => ZIP_CM_STORE, + deflate => ZIP_CM_DEFLATE, + bzip2 => ZIP_CM_BZIP2, + lzma => ZIP_CM_LZMA, + ); + + my $method = $valid{ lc $value }; + + Usage("Unknown method '$value'") + if ! defined $method; + + # If LZMA was rquested, check that it is available + if ($method == ZIP_CM_LZMA) + { + eval ' use IO::Compress::Adapter::Lzma'; + die "Method =. LZMA needs IO::Compress::Adapter::Lzma\n" + if ! defined $IO::Compress::Lzma::VERSION; + } + + $compression_method = $method; +} + +sub Usage +{ + die < zip file to stdout. No temporary files are created. + +The zip container written to stdout is, by necessity, written in streaming +format. Most programs that read Zip files can cope with a streamed zip file, +but if interoperability is important, and your workflow allows you to write the +zip file directly to disk you can create a non-streamed zip file using the C option. + +=head2 OPTIONS + +=over 5 + +=item -zip64 + +Create a Zip64-compliant zip container. +Use this option if the input is greater than 4Gig. + +Default is disabled. + +=item -zipfile=F + +Write zip container to the filename F. + +Use the C option to enable the creation of a streamed zip file. + +=item -member-name=M + +This option is used to name the "file" in the zip container. + +Default is '-'. + +=item -stream + +Ignored when writing to stdout. + +If the C option is specified, including this option +will trigger the creation of a streamed zip file. + +Default: Always enabled when writing to stdout, otherwise disabled. + +=item -method=M + +Compress using method "M". + +Valid method names are + + * store Store without compression + * deflate Use Deflate compression [Deflault] + * bzip2 Use Bzip2 compression + * lzma Use LZMA compression + +Note that Lzma compress needs IO::Compress::Lzma to be installed. + +Default is deflate. + +=item -version + +Display version number [$VERSION] + +=item -help + +Display help + +=back + +=head2 When to use a Streamed Zip File + +A Zip file created with streaming mode enabled allows you to create a zip file +in situations where you cannot seek backwards/forwards in the file. + +A good examples is when you are +serving dynamic content from a Web Server straight into a socket +without needing to create a temporary zip file in the filesystsm. + +Similarly if your workfow uses a Linux pipelined commands. + +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + + +=head1 AUTHOR + +Paul Marquess F. + +=head1 COPYRIGHT + +Copyright (c) 2019 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. + diff --git a/cpan/IO-Compress/bin/zipdetails b/cpan/IO-Compress/bin/zipdetails index d7b514636e73..bff32a1c02e2 100644 --- a/cpan/IO-Compress/bin/zipdetails +++ b/cpan/IO-Compress/bin/zipdetails @@ -180,7 +180,7 @@ my %Extras = ( ); -my $VERSION = "1.10" ; +my $VERSION = "1.11" ; my $FH; @@ -1201,7 +1201,7 @@ sub decode_Zip64 } if (full32 $z64Data->[2] ) { - out_VV " Offset to Central Dir"; + out_VV " Offset to Local Dir"; } if ($z64Data->[3] == 0xFFFF ) { @@ -2175,6 +2175,11 @@ Error handling is still a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an unhelpful error message. +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. =head1 SEE ALSO diff --git a/cpan/IO-Compress/lib/Compress/Zlib.pm b/cpan/IO-Compress/lib/Compress/Zlib.pm index 9884cea1ea93..5688b91d2366 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.087 ; -use Compress::Raw::Zlib 2.087 ; -use IO::Compress::Gzip 2.087 ; -use IO::Uncompress::Gunzip 2.087 ; +use IO::Compress::Base::Common 2.089 ; +use Compress::Raw::Zlib 2.089 ; +use IO::Compress::Gzip 2.089 ; +use IO::Uncompress::Gunzip 2.089 ; use strict ; use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.087'; +$VERSION = '2.089'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -461,7 +461,7 @@ sub inflate package Compress::Zlib ; -use IO::Compress::Gzip::Constants 2.087 ; +use IO::Compress::Gzip::Constants 2.089 ; sub memGzip($) { @@ -1467,6 +1467,12 @@ Returns the version of the zlib library. All the I constants are automatically imported when you make use of I. +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm index 78a817079019..ba33054ace95 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.087 qw(:Status); +use IO::Compress::Base::Common 2.089 qw(:Status); -use Compress::Raw::Bzip2 2.087 ; +use Compress::Raw::Bzip2 2.089 ; our ($VERSION); -$VERSION = '2.087'; +$VERSION = '2.089'; 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 39d84d9cbd65..673539c7cb6c 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm @@ -4,13 +4,13 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.087 qw(:Status); -use Compress::Raw::Zlib 2.087 qw( !crc32 !adler32 ) ; +use IO::Compress::Base::Common 2.089 qw(:Status); +use Compress::Raw::Zlib 2.089 qw( !crc32 !adler32 ) ; require Exporter; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, @EXPORT, %DEFLATE_CONSTANTS); -$VERSION = '2.087'; +$VERSION = '2.089'; @ISA = qw(Exporter); @EXPORT_OK = @Compress::Raw::Zlib::DEFLATE_CONSTANTS; %EXPORT_TAGS = %Compress::Raw::Zlib::DEFLATE_CONSTANTS; diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm index 12db1ffc9fc3..46c59e2e5952 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.087 qw(:Status); +use IO::Compress::Base::Common 2.089 qw(:Status); our ($VERSION); -$VERSION = '2.087'; +$VERSION = '2.089'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Base.pm b/cpan/IO-Compress/lib/IO/Compress/Base.pm index 7949af7d01ec..8a2bf853a262 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.006 ; use strict ; use warnings; -use IO::Compress::Base::Common 2.087 ; +use IO::Compress::Base::Common 2.089 ; use IO::File (); ; use Scalar::Util (); @@ -20,7 +20,7 @@ use Symbol(); our (@ISA, $VERSION); @ISA = qw(IO::File Exporter); -$VERSION = '2.087'; +$VERSION = '2.089'; #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. @@ -1021,6 +1021,12 @@ IO::Compress::Base - Base Class for IO::Compress modules This module is not intended for direct use in application code. Its sole purpose is to be sub-classed by IO::Compress modules. +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm index a78064f900c8..444a020201fa 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.087'; +$VERSION = '2.089'; @EXPORT = qw( isaFilehandle isaFilename isaScalar whatIsInput whatIsOutput diff --git a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm index 03fb7e6cd12c..59eaf616697d 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.087 ; +use IO::Compress::Base 2.089 ; -use IO::Compress::Base::Common 2.087 qw(); -use IO::Compress::Adapter::Bzip2 2.087 ; +use IO::Compress::Base::Common 2.089 qw(); +use IO::Compress::Adapter::Bzip2 2.089 ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); -$VERSION = '2.087'; +$VERSION = '2.089'; $Bzip2Error = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -51,7 +51,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.087 qw(:Parse); + use IO::Compress::Base::Common 2.089 qw(:Parse); return ( 'blocksize100k' => [IO::Compress::Base::Common::Parse_unsigned, 1], @@ -183,7 +183,6 @@ IO::Compress::Bzip2 - Write bzip2 files/buffers binmode $z fileno $z close $z ; - =head1 DESCRIPTION @@ -210,7 +209,8 @@ The functional interface needs Perl5.005 or better. =head2 bzip2 $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -319,9 +319,9 @@ in C<$output_filename_or_reference> as a concatenated series of compressed data =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -389,6 +389,22 @@ Defaults to 0. =head2 Examples +Here are a few example that show the capabilities of the module. + +=head3 Streaming + +This very simple command line example demonstrates the streaming capabilities of the module. +The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT. + + $ echo hello world | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 \*STDIN => \*STDOUT' >output.bz2 + +The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>, +so the above can be rewritten as + + $ echo hello world | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 "-" => "-"' >output.bz2 + +=head3 Compressing a file from the filesystem + To read the contents of the file C and write the compressed data to the file C. @@ -400,6 +416,8 @@ data to the file C. bzip2 $input => "$input.bz2" or die "bzip2 failed: $Bzip2Error\n"; +=head3 Reading from a Filehandle and writing to an in-memory buffer + To read from an existing Perl filehandle, C<$input>, and write the compressed data to a buffer, C<$buffer>. @@ -414,6 +432,8 @@ compressed data to a buffer, C<$buffer>. bzip2 $input => \$buffer or die "bzip2 failed: $Bzip2Error\n"; +=head3 Compressing multiple files + To compress all files in the directory "/my/home" that match "*.txt" and store the compressed data in the same directory @@ -488,7 +508,7 @@ return undef. =head2 Constructor Options -C is any combination of the following options: +C is any combination of zero or more the following options: =over 5 @@ -768,6 +788,12 @@ See L See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L @@ -778,7 +804,7 @@ L, L, L, L -The primary site for the bzip2 program is L. +The primary site for the bzip2 program is L. See the module L diff --git a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm index f69423767fdd..e58d57cf355c 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm @@ -8,16 +8,16 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.087 (); -use IO::Compress::Adapter::Deflate 2.087 ; +use IO::Compress::RawDeflate 2.089 (); +use IO::Compress::Adapter::Deflate 2.089 ; -use IO::Compress::Zlib::Constants 2.087 ; -use IO::Compress::Base::Common 2.087 qw(); +use IO::Compress::Zlib::Constants 2.089 ; +use IO::Compress::Base::Common 2.089 qw(); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $DeflateError); -$VERSION = '2.087'; +$VERSION = '2.089'; $DeflateError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -212,7 +212,6 @@ IO::Compress::Deflate - Write RFC 1950 files/buffers binmode $z fileno $z close $z ; - =head1 DESCRIPTION @@ -239,7 +238,8 @@ The functional interface needs Perl5.005 or better. =head2 deflate $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -348,9 +348,9 @@ in C<$output_filename_or_reference> as a concatenated series of compressed data =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -418,6 +418,22 @@ Defaults to 0. =head2 Examples +Here are a few example that show the capabilities of the module. + +=head3 Streaming + +This very simple command line example demonstrates the streaming capabilities of the module. +The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT. + + $ echo hello world | perl -MIO::Compress::Deflate=deflate -e 'deflate \*STDIN => \*STDOUT' >output.1950 + +The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>, +so the above can be rewritten as + + $ echo hello world | perl -MIO::Compress::Deflate=deflate -e 'deflate "-" => "-"' >output.1950 + +=head3 Compressing a file from the filesystem + To read the contents of the file C and write the compressed data to the file C. @@ -429,6 +445,8 @@ data to the file C. deflate $input => "$input.1950" or die "deflate failed: $DeflateError\n"; +=head3 Reading from a Filehandle and writing to an in-memory buffer + To read from an existing Perl filehandle, C<$input>, and write the compressed data to a buffer, C<$buffer>. @@ -443,6 +461,8 @@ compressed data to a buffer, C<$buffer>. deflate $input => \$buffer or die "deflate failed: $DeflateError\n"; +=head3 Compressing multiple files + To compress all files in the directory "/my/home" that match "*.txt" and store the compressed data in the same directory @@ -517,7 +537,7 @@ return undef. =head2 Constructor Options -C is any combination of the following options: +C is any combination of zero or more the following options: =over 5 @@ -892,6 +912,12 @@ See L See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/FAQ.pod b/cpan/IO-Compress/lib/IO/Compress/FAQ.pod index 1e66507aa2d9..697f0f3d3b0c 100644 --- a/cpan/IO-Compress/lib/IO/Compress/FAQ.pod +++ b/cpan/IO-Compress/lib/IO/Compress/FAQ.pod @@ -656,6 +656,12 @@ One final point -- obviously C can only be used whenever you know the length of the compressed data beforehand, like here with a zip file. +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm index d12f7cd7bc1e..51e6d0c685e2 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm @@ -8,12 +8,12 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.087 () ; -use IO::Compress::Adapter::Deflate 2.087 ; +use IO::Compress::RawDeflate 2.089 () ; +use IO::Compress::Adapter::Deflate 2.089 ; -use IO::Compress::Base::Common 2.087 qw(:Status ); -use IO::Compress::Gzip::Constants 2.087 ; -use IO::Compress::Zlib::Extra 2.087 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Compress::Gzip::Constants 2.089 ; +use IO::Compress::Zlib::Extra 2.089 ; BEGIN { @@ -25,7 +25,7 @@ BEGIN our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $GzipError); -$VERSION = '2.087'; +$VERSION = '2.089'; $GzipError = '' ; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -319,7 +319,6 @@ IO::Compress::Gzip - Write RFC 1952 files/buffers binmode $z fileno $z close $z ; - =head1 DESCRIPTION @@ -349,7 +348,8 @@ The functional interface needs Perl5.005 or better. =head2 gzip $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -466,9 +466,9 @@ in C<$output_filename_or_reference> as a concatenated series of compressed data =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -536,6 +536,22 @@ Defaults to 0. =head2 Examples +Here are a few example that show the capabilities of the module. + +=head3 Streaming + +This very simple command line example demonstrates the streaming capabilities of the module. +The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT. + + $ echo hello world | perl -MIO::Compress::Gzip=gzip -e 'gzip \*STDIN => \*STDOUT' >output.gz + +The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>, +so the above can be rewritten as + + $ echo hello world | perl -MIO::Compress::Gzip=gzip -e 'gzip "-" => "-"' >output.gz + +=head3 Compressing a file from the filesystem + To read the contents of the file C and write the compressed data to the file C. @@ -547,6 +563,8 @@ data to the file C. gzip $input => "$input.gz" or die "gzip failed: $GzipError\n"; +=head3 Reading from a Filehandle and writing to an in-memory buffer + To read from an existing Perl filehandle, C<$input>, and write the compressed data to a buffer, C<$buffer>. @@ -561,6 +579,8 @@ compressed data to a buffer, C<$buffer>. gzip $input => \$buffer or die "gzip failed: $GzipError\n"; +=head3 Compressing multiple files + To compress all files in the directory "/my/home" that match "*.txt" and store the compressed data in the same directory @@ -635,7 +655,7 @@ return undef. =head2 Constructor Options -C is any combination of the following options: +C is any combination of zero or more the following options: =over 5 @@ -1204,6 +1224,12 @@ See L See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm index 7d321441d347..e420b6144be9 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.087'; +$VERSION = '2.089'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm index 8865724b06a4..69c17869adce 100644 --- a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm @@ -6,15 +6,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base 2.087 ; -use IO::Compress::Base::Common 2.087 qw(:Status ); -use IO::Compress::Adapter::Deflate 2.087 ; +use IO::Compress::Base 2.089 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Compress::Adapter::Deflate 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.087'; +$VERSION = '2.089'; $RawDeflateError = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -116,8 +116,8 @@ sub getExtraParams return getZlibParams(); } -use IO::Compress::Base::Common 2.087 qw(:Parse); -use Compress::Raw::Zlib 2.087 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); +use IO::Compress::Base::Common 2.089 qw(:Parse); +use Compress::Raw::Zlib 2.089 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); our %PARAMS = ( #'method' => [IO::Compress::Base::Common::Parse_unsigned, Z_DEFLATED], 'level' => [IO::Compress::Base::Common::Parse_signed, Z_DEFAULT_COMPRESSION], @@ -265,7 +265,6 @@ IO::Compress::RawDeflate - Write RFC 1951 files/buffers binmode $z fileno $z close $z ; - =head1 DESCRIPTION @@ -295,7 +294,8 @@ The functional interface needs Perl5.005 or better. =head2 rawdeflate $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -404,9 +404,9 @@ in C<$output_filename_or_reference> as a concatenated series of compressed data =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -474,6 +474,22 @@ Defaults to 0. =head2 Examples +Here are a few example that show the capabilities of the module. + +=head3 Streaming + +This very simple command line example demonstrates the streaming capabilities of the module. +The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT. + + $ echo hello world | perl -MIO::Compress::RawDeflate=rawdeflate -e 'rawdeflate \*STDIN => \*STDOUT' >output.1951 + +The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>, +so the above can be rewritten as + + $ echo hello world | perl -MIO::Compress::RawDeflate=rawdeflate -e 'rawdeflate "-" => "-"' >output.1951 + +=head3 Compressing a file from the filesystem + To read the contents of the file C and write the compressed data to the file C. @@ -485,6 +501,8 @@ data to the file C. rawdeflate $input => "$input.1951" or die "rawdeflate failed: $RawDeflateError\n"; +=head3 Reading from a Filehandle and writing to an in-memory buffer + To read from an existing Perl filehandle, C<$input>, and write the compressed data to a buffer, C<$buffer>. @@ -499,6 +517,8 @@ compressed data to a buffer, C<$buffer>. rawdeflate $input => \$buffer or die "rawdeflate failed: $RawDeflateError\n"; +=head3 Compressing multiple files + To compress all files in the directory "/my/home" that match "*.txt" and store the compressed data in the same directory @@ -573,7 +593,7 @@ return undef. =head2 Constructor Options -C is any combination of the following options: +C is any combination of zero or more the following options: =over 5 @@ -948,6 +968,12 @@ See L See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip.pm b/cpan/IO-Compress/lib/IO/Compress/Zip.pm index a5a25660a9ae..97c6f5f27f4a 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip.pm @@ -4,30 +4,30 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.087 qw(:Status ); -use IO::Compress::RawDeflate 2.087 (); -use IO::Compress::Adapter::Deflate 2.087 ; -use IO::Compress::Adapter::Identity 2.087 ; -use IO::Compress::Zlib::Extra 2.087 ; -use IO::Compress::Zip::Constants 2.087 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Compress::RawDeflate 2.089 (); +use IO::Compress::Adapter::Deflate 2.089 ; +use IO::Compress::Adapter::Identity 2.089 ; +use IO::Compress::Zlib::Extra 2.089 ; +use IO::Compress::Zip::Constants 2.089 ; use File::Spec(); use Config; -use Compress::Raw::Zlib 2.087 (); +use Compress::Raw::Zlib 2.089 (); BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - import IO::Compress::Adapter::Bzip2 2.087 ; + import IO::Compress::Adapter::Bzip2 2.089 ; require IO::Compress::Bzip2 ; - import IO::Compress::Bzip2 2.087 ; + import IO::Compress::Bzip2 2.089 ; } ; eval { require IO::Compress::Adapter::Lzma ; - import IO::Compress::Adapter::Lzma 2.087 ; + import IO::Compress::Adapter::Lzma 2.089 ; require IO::Compress::Lzma ; - import IO::Compress::Lzma 2.087 ; + import IO::Compress::Lzma 2.089 ; } ; } @@ -36,7 +36,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $ZipError); -$VERSION = '2.087'; +$VERSION = '2.089'; $ZipError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -909,7 +909,6 @@ IO::Compress::Zip - Write zip files/buffers binmode $z fileno $z close $z ; - =head1 DESCRIPTION @@ -920,14 +919,18 @@ The primary purpose of this module is to provide streaming write access to zip files and buffers. It is not a general-purpose file archiver. If that is what you want, check out C or C. -At present three compression methods are supported by IO::Compress::Zip, +At present the following compression methods are supported by IO::Compress::Zip, namely Store (no compression at all), Deflate, Bzip2 and LZMA. -Note that to create Bzip2 content, the module C must -be installed. +B + +=over 5 + +=item * To use Bzip2 compression, the module C must be installed. + +=item * To use LZMA compression, the module C must be installed. -Note that to create LZMA content, the module C must -be installed. +=back For reading zip files/buffers, see the companion module L. @@ -949,7 +952,8 @@ The functional interface needs Perl5.005 or better. =head2 zip $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -1066,9 +1070,9 @@ in C<$output_filename_or_reference> as a distinct entry. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -1136,6 +1140,50 @@ Defaults to 0. =head2 Examples +Here are a few example that show the capabilities of the module. + +=head3 Streaming + +This very simple command line example demonstrates the streaming capabilities of the module. +The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT. + + $ echo hello world | perl -MIO::Compress::Zip=zip -e 'zip \*STDIN => \*STDOUT' >output.zip + +The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>, +so the above can be rewritten as + + $ echo hello world | perl -MIO::Compress::Zip=zip -e 'zip "-" => "-"' >output.zip + +One problem with creating a zip archive directly from STDIN can be demonstrated by looking at +the contents of the zip file, output.zip, that we have just created. + + $ unzip -l output.zip + Archive: output.zip + Length Date Time Name + --------- ---------- ----- ---- + 12 2019-08-16 22:21 + --------- ------- + 12 1 file + +The archive member (filename) used is the empty string. + +If that doesn't suit your needs, you can explicitly set the filename used +in the zip archive by specifying the L option, like so + + echo hello world | perl -MIO::Compress::Zip=zip -e 'zip "-" => "-", Name => "hello.txt"' >output.zip + +Now the contents of the zip file looks like this + + $ unzip -l output.zip + Archive: output.zip + Length Date Time Name + --------- ---------- ----- ---- + 12 2019-08-16 22:22 hello.txt + --------- ------- + 12 1 file + +=head3 Compressing a file from the filesystem + To read the contents of the file C and write the compressed data to the file C. @@ -1147,6 +1195,8 @@ data to the file C. zip $input => "$input.zip" or die "zip failed: $ZipError\n"; +=head3 Reading from a Filehandle and writing to an in-memory buffer + To read from an existing Perl filehandle, C<$input>, and write the compressed data to a buffer, C<$buffer>. @@ -1161,6 +1211,8 @@ compressed data to a buffer, C<$buffer>. zip $input => \$buffer or die "zip failed: $ZipError\n"; +=head3 Compressing multiple files + To create a zip file, C, that contains the compressed contents of the files C and C @@ -1239,7 +1291,7 @@ return undef. =head2 Constructor Options -C is any combination of the following options: +C is any combination of zero or more the following options: =over 5 @@ -1282,25 +1334,52 @@ to it. Otherwise the file pointer will not be moved. This parameter defaults to 0. +=back + +=head3 File Naming Options + +A quick bit of zip file terminology -- A zip archive consists of one or more I, where each member has an associated +filename, known as the I. + +The options listed in this section control how the I (or filename) is stored the zip archive. + +=over 5 + =item C<< Name => $string >> -Stores the contents of C<$string> in the zip filename header field. +This option is used to explicitly set the I in +the zip archive to C<$string>. +Most of the time you don't need to make use of this option. +By default when adding a filename to the zip archive, the I will match the filename. -If C is not specified and the C<$input> parameter is a filename, the -value of C<$input> will be used for the zip filename header field. +You should only need to use this option if you want the I +to be different from the uncompressed filename or when the input is a filehandle or a buffer. -If C is not specified and the C<$input> parameter is not a filename, -no zip filename field will be created. +The default behaviour for what I is used when the C option +is I speficied depends on the form of the C<$input> parameter: + +=over 5 + +=item * + +If the C<$input> parameter is a filename, the +value of C<$input> will be used for the I . + +=item * +If the C<$input> parameter is not a filename, +the I will be an empty string. + +=back Note that both the C and C options -can modify the value used for the zip filename header field. +can modify the value used for the I. Also note that you should set the C option to true if you are working -with UTF8 filenames. +with UTF8 filenames. =item C<< CanonicalName => 0|1 >> -This option controls whether the filename field in the zip header is +This option controls whether the I is I into Unix format before being written to the zip file. It is recommended that you enable this option unless you really need @@ -1320,15 +1399,14 @@ This option defaults to B. =item C<< FilterName => sub { ... } >> -This option allow the filename field in the zip header to be modified +This option allow the I name to be modified before it is written to the zip file. This option takes a parameter that must be a reference to a sub. On entry to the sub the C<$_> variable will contain the name to be filtered. If no filename is available C<$_> will contain an empty string. -The value of C<$_> when the sub returns will be stored in the filename -header field. +The value of C<$_> when the sub returns will be used as the I. Note that if C is enabled, a normalized filename will be passed to the sub. @@ -1354,7 +1432,7 @@ filenames before they are stored in C<$zipfile>. This option controls setting of the "Language Encoding Flag" (EFS) in the zip archive. When set, the filename and comment fields for the zip archive MUST -be valid UTF-8. +be valid UTF-8. If the string used for the filename and/or comment is not valid UTF-8 when this option is true, the script will die with a "wide character" error. @@ -1363,6 +1441,154 @@ Note that this option only works with Perl 5.8.4 or better. This option defaults to B. +=back + +=head3 Overall Zip Archive Structure + +=over 5 + +=item C<< Minimal => 1|0 >> + +If specified, this option will disable the creation of all extra fields +in the zip local and central headers. So the C, C, +C, C and C options will +be ignored. + +This parameter defaults to 0. + +=item C<< Stream => 0|1 >> + +This option controls whether the zip file/buffer output is created in +streaming mode. + +Note that when outputting to a file with streaming mode disabled (C +is 0), the output file must be seekable. + +The default is 1. + +=item C<< Zip64 => 0|1 >> + +Create a Zip64 zip file/buffer. This option is used if you want +to store files larger than 4 Gig or store more than 64K files in a single +zip archive. + +C will be automatically set, as needed, if working with the one-shot +interface when the input is either a filename or a scalar reference. + +If you intend to manipulate the Zip64 zip files created with this module +using an external zip/unzip, make sure that it supports Zip64. + +In particular, if you are using Info-Zip you need to have zip version 3.x +or better to update a Zip64 archive and unzip version 6.x to read a zip64 +archive. + +The default is 0. + +=back + +=head3 Deflate Compression Options + +=over 5 + +=item -Level + +Defines the compression level used by zlib. The value should either be +a number between 0 and 9 (0 means no compression and 9 is maximum +compression), or one of the symbolic constants defined below. + + Z_NO_COMPRESSION + Z_BEST_SPEED + Z_BEST_COMPRESSION + Z_DEFAULT_COMPRESSION + +The default is Z_DEFAULT_COMPRESSION. + +Note, these constants are not imported by C by default. + + use IO::Compress::Zip qw(:strategy); + use IO::Compress::Zip qw(:constants); + use IO::Compress::Zip qw(:all); + +=item -Strategy + +Defines the strategy used to tune the compression. Use one of the symbolic +constants defined below. + + Z_FILTERED + Z_HUFFMAN_ONLY + Z_RLE + Z_FIXED + Z_DEFAULT_STRATEGY + +The default is Z_DEFAULT_STRATEGY. + +=back + +=head3 Bzip2 Compression Options + +=over 5 + +=item C<< BlockSize100K => number >> + +Specify the number of 100K blocks bzip2 uses during compression. + +Valid values are from 1 to 9, where 9 is best compression. + +This option is only valid if the C is ZIP_CM_BZIP2. It is ignored +otherwise. + +The default is 1. + +=item C<< WorkFactor => number >> + +Specifies how much effort bzip2 should take before resorting to a slower +fallback compression algorithm. + +Valid values range from 0 to 250, where 0 means use the default value 30. + +This option is only valid if the C is ZIP_CM_BZIP2. It is ignored +otherwise. + +The default is 0. + +=back + +=head3 Lzma Compression Options + +=over 5 + +=item C<< Preset => number >> + +Used to choose the LZMA compression preset. + +Valid values are 0-9 and C. + +0 is the fastest compression with the lowest memory usage and the lowest +compression. + +9 is the slowest compression with the highest memory usage but with the best +compression. + +This option is only valid if the C is ZIP_CM_LZMA. It is ignored +otherwise. + +Defaults to C (6). + +=item C<< Extreme => 0|1 >> + +Makes LZMA compression a lot slower, but a small compression gain. + +This option is only valid if the C is ZIP_CM_LZMA. It is ignored +otherwise. + +Defaults to 0. + +=back + +=head3 Other Options + +=over 5 + =item C<< Time => $number >> Sets the last modified time field in the zip header to $number. @@ -1480,34 +1706,6 @@ content when C is not available. The default method is ZIP_CM_DEFLATE. -=item C<< Stream => 0|1 >> - -This option controls whether the zip file/buffer output is created in -streaming mode. - -Note that when outputting to a file with streaming mode disabled (C -is 0), the output file must be seekable. - -The default is 1. - -=item C<< Zip64 => 0|1 >> - -Create a Zip64 zip file/buffer. This option is used if you want -to store files larger than 4 Gig or store more than 64K files in a single -zip archive. - -C will be automatically set, as needed, if working with the one-shot -interface when the input is either a filename or a scalar reference. - -If you intend to manipulate the Zip64 zip files created with this module -using an external zip/unzip, make sure that it supports Zip64. - -In particular, if you are using Info-Zip you need to have zip version 3.x -or better to update a Zip64 archive and unzip version 6.x to read a zip64 -archive. - -The default is 0. - =item C<< TextFlag => 0|1 >> This parameter controls the setting of a bit in the zip central header. It @@ -1568,96 +1766,6 @@ If the C option is set to true, this option will be ignored. The maximum size of an extra field 65535 bytes. -=item C<< Minimal => 1|0 >> - -If specified, this option will disable the creation of all extra fields -in the zip local and central headers. So the C, C, -C, C and C options will -be ignored. - -This parameter defaults to 0. - -=item C<< BlockSize100K => number >> - -Specify the number of 100K blocks bzip2 uses during compression. - -Valid values are from 1 to 9, where 9 is best compression. - -This option is only valid if the C is ZIP_CM_BZIP2. It is ignored -otherwise. - -The default is 1. - -=item C<< WorkFactor => number >> - -Specifies how much effort bzip2 should take before resorting to a slower -fallback compression algorithm. - -Valid values range from 0 to 250, where 0 means use the default value 30. - -This option is only valid if the C is ZIP_CM_BZIP2. It is ignored -otherwise. - -The default is 0. - -=item C<< Preset => number >> - -Used to choose the LZMA compression preset. - -Valid values are 0-9 and C. - -0 is the fastest compression with the lowest memory usage and the lowest -compression. - -9 is the slowest compression with the highest memory usage but with the best -compression. - -This option is only valid if the C is ZIP_CM_LZMA. It is ignored -otherwise. - -Defaults to C (6). - -=item C<< Extreme => 0|1 >> - -Makes LZMA compression a lot slower, but a small compression gain. - -This option is only valid if the C is ZIP_CM_LZMA. It is ignored -otherwise. - -Defaults to 0. - -=item -Level - -Defines the compression level used by zlib. The value should either be -a number between 0 and 9 (0 means no compression and 9 is maximum -compression), or one of the symbolic constants defined below. - - Z_NO_COMPRESSION - Z_BEST_SPEED - Z_BEST_COMPRESSION - Z_DEFAULT_COMPRESSION - -The default is Z_DEFAULT_COMPRESSION. - -Note, these constants are not imported by C by default. - - use IO::Compress::Zip qw(:strategy); - use IO::Compress::Zip qw(:constants); - use IO::Compress::Zip qw(:all); - -=item -Strategy - -Defines the strategy used to tune the compression. Use one of the symbolic -constants defined below. - - Z_FILTERED - Z_HUFFMAN_ONLY - Z_RLE - Z_FIXED - Z_DEFAULT_STRATEGY - -The default is Z_DEFAULT_STRATEGY. - =item C<< Strict => 0|1 >> This is a placeholder option. @@ -1940,6 +2048,12 @@ See L See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm index 55aac59bec27..f758778644b6 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.087'; +$VERSION = '2.089'; @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 7cfc77ee7125..f8580d59ec16 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.087'; +$VERSION = '2.089'; @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 387f61c16d9f..4be5b690894f 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.087'; +$VERSION = '2.089'; -use IO::Compress::Gzip::Constants 2.087 ; +use IO::Compress::Gzip::Constants 2.089 ; 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 30c9d28e8876..a9de5468be13 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.087 qw(:Status); +use IO::Compress::Base::Common 2.089 qw(:Status); -use Compress::Raw::Bzip2 2.087 ; +use Compress::Raw::Bzip2 2.089 ; our ($VERSION, @ISA); -$VERSION = '2.087'; +$VERSION = '2.089'; 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 8d7337d1bbea..569fafd0a45f 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm @@ -4,14 +4,14 @@ use warnings; use strict; use bytes; -use IO::Compress::Base::Common 2.087 qw(:Status); +use IO::Compress::Base::Common 2.089 qw(:Status); use IO::Compress::Zip::Constants ; our ($VERSION); -$VERSION = '2.087'; +$VERSION = '2.089'; -use Compress::Raw::Zlib 2.087 (); +use Compress::Raw::Zlib 2.089 (); sub mkUncompObject { @@ -139,7 +139,7 @@ sub reset { my $self = shift; - $self->{CompSize} = 0; + $self->{CompSize}->reset(); $self->{UnCompSize} = 0; $self->{CRC32} = Compress::Raw::Zlib::crc32(''); $self->{ADLER32} = Compress::Raw::Zlib::adler32(''); diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm index 6828a2d3998c..904bab64a3f3 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.087 qw(:Status); -use Compress::Raw::Zlib 2.087 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); +use IO::Compress::Base::Common 2.089 qw(:Status); +use Compress::Raw::Zlib 2.089 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); our ($VERSION); -$VERSION = '2.087'; +$VERSION = '2.089'; diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm index a716c8147a16..d538c6eb3c7f 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.087 (); +use IO::Compress::Base::Common 2.089 (); -use IO::Uncompress::Adapter::Inflate 2.087 (); +use IO::Uncompress::Adapter::Inflate 2.089 (); -use IO::Uncompress::Base 2.087 ; -use IO::Uncompress::Gunzip 2.087 ; -use IO::Uncompress::Inflate 2.087 ; -use IO::Uncompress::RawInflate 2.087 ; -use IO::Uncompress::Unzip 2.087 ; +use IO::Uncompress::Base 2.089 ; +use IO::Uncompress::Gunzip 2.089 ; +use IO::Uncompress::Inflate 2.089 ; +use IO::Uncompress::RawInflate 2.089 ; +use IO::Uncompress::Unzip 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError); -$VERSION = '2.087'; +$VERSION = '2.089'; $AnyInflateError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -48,7 +48,7 @@ sub anyinflate sub getExtraParams { - use IO::Compress::Base::Common 2.087 qw(:Parse); + use IO::Compress::Base::Common 2.089 qw(:Parse); return ( 'rawinflate' => [Parse_boolean, 0] ) ; } @@ -213,7 +213,8 @@ The functional interface needs Perl5.005 or better. =head2 anyinflate $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -323,9 +324,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -959,6 +960,12 @@ Same as doing this See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm index c7b0e24c8f2e..e75ec405e3cf 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.087 (); +use IO::Compress::Base::Common 2.089 (); -use IO::Uncompress::Base 2.087 ; +use IO::Uncompress::Base 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.087'; +$VERSION = '2.089'; $AnyUncompressError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -33,26 +33,26 @@ BEGIN # Don't trigger any __DIE__ Hooks. local $SIG{__DIE__}; - eval ' use IO::Uncompress::Adapter::Inflate 2.087 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.087 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.087 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.087 ;'; - eval ' use IO::Uncompress::Adapter::UnLzma 2.087 ;'; - eval ' use IO::Uncompress::Adapter::UnXz 2.087 ;'; + eval ' use IO::Uncompress::Adapter::Inflate 2.089 ;'; + eval ' use IO::Uncompress::Adapter::Bunzip2 2.089 ;'; + eval ' use IO::Uncompress::Adapter::LZO 2.089 ;'; + eval ' use IO::Uncompress::Adapter::Lzf 2.089 ;'; + eval ' use IO::Uncompress::Adapter::UnLzma 2.089 ;'; + eval ' use IO::Uncompress::Adapter::UnXz 2.089 ;'; eval ' use IO::Uncompress::Adapter::UnZstd 2.083 ;'; - eval ' use IO::Uncompress::Adapter::UnLzip 2.087 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.087 ;'; - eval ' use IO::Uncompress::UnLzop 2.087 ;'; - eval ' use IO::Uncompress::Gunzip 2.087 ;'; - eval ' use IO::Uncompress::Inflate 2.087 ;'; - eval ' use IO::Uncompress::RawInflate 2.087 ;'; - eval ' use IO::Uncompress::Unzip 2.087 ;'; - eval ' use IO::Uncompress::UnLzf 2.087 ;'; - eval ' use IO::Uncompress::UnLzma 2.087 ;'; - eval ' use IO::Uncompress::UnXz 2.087 ;'; - eval ' use IO::Uncompress::UnZstd 2.087 ;'; - eval ' use IO::Uncompress::UnLzip 2.087 ;'; + eval ' use IO::Uncompress::Adapter::UnLzip 2.089 ;'; + + eval ' use IO::Uncompress::Bunzip2 2.089 ;'; + eval ' use IO::Uncompress::UnLzop 2.089 ;'; + eval ' use IO::Uncompress::Gunzip 2.089 ;'; + eval ' use IO::Uncompress::Inflate 2.089 ;'; + eval ' use IO::Uncompress::RawInflate 2.089 ;'; + eval ' use IO::Uncompress::Unzip 2.089 ;'; + eval ' use IO::Uncompress::UnLzf 2.089 ;'; + eval ' use IO::Uncompress::UnLzma 2.089 ;'; + eval ' use IO::Uncompress::UnXz 2.089 ;'; + eval ' use IO::Uncompress::UnZstd 2.089 ;'; + eval ' use IO::Uncompress::UnLzip 2.089 ;'; } @@ -270,7 +270,7 @@ __END__ =head1 NAME -IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer +IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, xz, lzma, lzip, lzf or lzop file/buffer =head1 SYNOPSIS @@ -367,7 +367,8 @@ The functional interface needs Perl5.005 or better. =head2 anyuncompress $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -477,9 +478,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -1048,6 +1049,12 @@ Same as doing this =head1 EXAMPLES +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm index 6b8636ad39ba..ded9b74fa8e4 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(IO::File Exporter); -$VERSION = '2.087'; +$VERSION = '2.089'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.087 ; +use IO::Compress::Base::Common 2.089 ; use IO::File ; use Symbol; @@ -1534,6 +1534,12 @@ IO::Uncompress::Base - Base Class for IO::Uncompress modules This module is not intended for direct use in application code. Its sole purpose is to be sub-classed by IO::Uncompress modules. +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm index 40779982282b..abaa91976817 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.087 qw(:Status ); +use IO::Compress::Base::Common 2.089 qw(:Status ); -use IO::Uncompress::Base 2.087 ; -use IO::Uncompress::Adapter::Bunzip2 2.087 ; +use IO::Uncompress::Base 2.089 ; +use IO::Uncompress::Adapter::Bunzip2 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error); -$VERSION = '2.087'; +$VERSION = '2.089'; $Bunzip2Error = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -209,7 +209,8 @@ The functional interface needs Perl5.005 or better. =head2 bunzip2 $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -319,9 +320,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -876,6 +877,12 @@ Same as doing this See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L @@ -886,7 +893,7 @@ L, L, L, L -The primary site for the bzip2 program is L. +The primary site for the bzip2 program is L. See the module L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm index c04030583ee5..6e2e4bb98984 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.087 ; +use IO::Uncompress::RawInflate 2.089 ; -use Compress::Raw::Zlib 2.087 () ; -use IO::Compress::Base::Common 2.087 qw(:Status ); -use IO::Compress::Gzip::Constants 2.087 ; -use IO::Compress::Zlib::Extra 2.087 ; +use Compress::Raw::Zlib 2.089 () ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Compress::Gzip::Constants 2.089 ; +use IO::Compress::Zlib::Extra 2.089 ; require Exporter ; @@ -28,7 +28,7 @@ Exporter::export_ok_tags('all'); $GunzipError = ''; -$VERSION = '2.087'; +$VERSION = '2.089'; sub new { @@ -348,7 +348,8 @@ The functional interface needs Perl5.005 or better. =head2 gunzip $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -458,9 +459,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -1082,6 +1083,12 @@ Same as doing this See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm index 850ae37b5daf..b283a2641ba3 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.087 qw(:Status ); -use IO::Compress::Zlib::Constants 2.087 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Compress::Zlib::Constants 2.089 ; -use IO::Uncompress::RawInflate 2.087 ; +use IO::Uncompress::RawInflate 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.087'; +$VERSION = '2.089'; $InflateError = ''; @ISA = qw(IO::Uncompress::RawInflate Exporter); @@ -270,7 +270,8 @@ The functional interface needs Perl5.005 or better. =head2 inflate $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -380,9 +381,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -954,6 +955,12 @@ Same as doing this See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm index 5e57e56a6491..9a4478a893e6 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.087 ; -use IO::Compress::Base::Common 2.087 qw(:Status ); +use Compress::Raw::Zlib 2.089 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); -use IO::Uncompress::Base 2.087 ; -use IO::Uncompress::Adapter::Inflate 2.087 ; +use IO::Uncompress::Base 2.089 ; +use IO::Uncompress::Adapter::Inflate 2.089 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError); -$VERSION = '2.087'; +$VERSION = '2.089'; $RawInflateError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -418,7 +418,8 @@ The functional interface needs Perl5.005 or better. =head2 rawinflate $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -528,9 +529,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -1082,6 +1083,12 @@ Same as doing this See L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm index 8b83969a9f1d..da882b83d7c6 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm @@ -9,14 +9,14 @@ use warnings; use bytes; use IO::File; -use IO::Uncompress::RawInflate 2.087 ; -use IO::Compress::Base::Common 2.087 qw(:Status ); -use IO::Uncompress::Adapter::Inflate 2.087 ; -use IO::Uncompress::Adapter::Identity 2.087 ; -use IO::Compress::Zlib::Extra 2.087 ; -use IO::Compress::Zip::Constants 2.087 ; +use IO::Uncompress::RawInflate 2.089 ; +use IO::Compress::Base::Common 2.089 qw(:Status ); +use IO::Uncompress::Adapter::Inflate 2.089 ; +use IO::Uncompress::Adapter::Identity 2.089 ; +use IO::Compress::Zlib::Extra 2.089 ; +use IO::Compress::Zip::Constants 2.089 ; -use Compress::Raw::Zlib 2.087 () ; +use Compress::Raw::Zlib 2.089 () ; BEGIN { @@ -34,7 +34,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.087'; +$VERSION = '2.089'; $UnzipError = ''; @ISA = qw(IO::Uncompress::RawInflate Exporter); @@ -1122,7 +1122,8 @@ The functional interface needs Perl5.005 or better. =head2 unzip $input_filename_or_reference => $output_filename_or_reference [, OPTS] C expects at least two parameters, -C<$input_filename_or_reference> and C<$output_filename_or_reference>. +C<$input_filename_or_reference> and C<$output_filename_or_reference> +and zero or more optional parameters (see L) =head3 The C<$input_filename_or_reference> parameter @@ -1232,9 +1233,9 @@ files/buffers. =head2 Optional Parameters -Unless specified below, the optional parameters for C, -C, are the same as those used with the OO interface defined in the -L section below. +The optional parameters for the one-shot function C +are (for the most part) identical to those used with the OO interface defined in the +L section. The exceptions are listed below =over 5 @@ -1859,6 +1860,12 @@ to read a zip file and unzip its contents to disk. The script is available from L +=head1 SUPPORT + +General feedback/questions/bug reports should be sent to +L (preferred) or +L. + =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L diff --git a/cpan/IO-Compress/t/000prereq.t b/cpan/IO-Compress/t/000prereq.t index 0c4d8402872f..030a7fe02c5a 100644 --- a/cpan/IO-Compress/t/000prereq.t +++ b/cpan/IO-Compress/t/000prereq.t @@ -25,7 +25,7 @@ BEGIN if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - my $VERSION = '2.087'; + my $VERSION = '2.089'; my @NAMES = qw( Compress::Raw::Bzip2 Compress::Raw::Zlib diff --git a/cpan/IO-Compress/t/105oneshot-zip-only.t b/cpan/IO-Compress/t/105oneshot-zip-only.t index 94676eb5dd6d..7611da3774e6 100644 --- a/cpan/IO-Compress/t/105oneshot-zip-only.t +++ b/cpan/IO-Compress/t/105oneshot-zip-only.t @@ -24,7 +24,7 @@ BEGIN { $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 219 + $extra ; + plan tests => 227 + $extra ; #use_ok('IO::Compress::Zip', qw(zip $ZipError :zip_method)) ; use_ok('IO::Compress::Zip', qw(:all)) ; @@ -162,6 +162,55 @@ sub zipGetHeader is $hdr->{Name}, File::Spec->catfile("", "fred", "jim"), " Name is '/fred/jim'" ; } +{ + title "Detect encrypted zip file"; + + my $files = "./t/" ; + $files = "./" if $ENV{PERL_CORE} ; + $files .= "files/"; + + my $zipfile = "$files/encrypt-standard.zip" ; + my $output; + + ok ! unzip "$files/encrypt-standard.zip" => \$output ; + like $UnzipError, qr/Encrypted content not supported/ ; + + ok ! unzip "$files/encrypt-aes.zip" => \$output ; + like $UnzipError, qr/Encrypted content not supported/ ; +} + +{ + title "jar file with deflated directory"; + + # Create Jar as follow + # echo test > file && jar c file > jar.zip + + # Note the deflated directory META-INF with length 0 & size 2 + # + # $ unzip -vl t/files/jar.zip + # Archive: t/files/jar.zip + # Length Method Size Cmpr Date Time CRC-32 Name + # -------- ------ ------- ---- ---------- ----- -------- ---- + # 0 Defl:N 2 0% 2019-09-07 22:35 00000000 META-INF/ + # 54 Defl:N 53 2% 2019-09-07 22:35 934e49ff META-INF/MANIFEST.MF + # 5 Defl:N 7 -40% 2019-09-07 22:35 3bb935c6 file + # -------- ------- --- ------- + # 59 62 -5% 3 files + + + my $files = "./t/" ; + $files = "./" if $ENV{PERL_CORE} ; + $files .= "files/"; + + my $zipfile = "$files/jar.zip" ; + my $output; + + ok unzip $zipfile => \$output ; + + is $output, "" ; + +} + for my $stream (0, 1) { for my $zip64 (0, 1) diff --git a/cpan/IO-Compress/t/files/encrypt-aes.zip b/cpan/IO-Compress/t/files/encrypt-aes.zip new file mode 100644 index 000000000000..7a303da87f22 Binary files /dev/null and b/cpan/IO-Compress/t/files/encrypt-aes.zip differ diff --git a/cpan/IO-Compress/t/files/encrypt-standard.zip b/cpan/IO-Compress/t/files/encrypt-standard.zip new file mode 100644 index 000000000000..ba07a08e5875 Binary files /dev/null and b/cpan/IO-Compress/t/files/encrypt-standard.zip differ diff --git a/cpan/IO-Compress/t/files/jar.zip b/cpan/IO-Compress/t/files/jar.zip new file mode 100644 index 000000000000..e471d42c464c Binary files /dev/null and b/cpan/IO-Compress/t/files/jar.zip differ diff --git a/utils.lst b/utils.lst index a97702640047..4856fdae3915 100644 --- a/utils.lst +++ b/utils.lst @@ -23,5 +23,6 @@ utils/ptardiff utils/ptargrep utils/shasum utils/splain +utils/streamzip utils/xsubpp utils/zipdetails diff --git a/utils/Makefile.PL b/utils/Makefile.PL index f9f80ed451d5..3bf9546e5949 100644 --- a/utils/Makefile.PL +++ b/utils/Makefile.PL @@ -35,9 +35,9 @@ print $fh <<'EOT'; # Files to be built with variable substitution after miniperl is # available. Dependencies handled manually below (for now). -pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL -plextract = corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails -plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails +pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL streamzip.PL +plextract = corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails streamzip +plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails ./streamzip all: $(plextract) @@ -88,6 +88,8 @@ xsubpp: xsubpp.PL ../config.sh zipdetails: zipdetails.PL ../config.sh +streamzip: streamzip.PL ../config.sh + pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html clean: diff --git a/utils/streamzip.PL b/utils/streamzip.PL new file mode 100644 index 000000000000..82887ac40063 --- /dev/null +++ b/utils/streamzip.PL @@ -0,0 +1,51 @@ +#!/usr/local/bin/perl + +use Config; +use File::Basename qw(&basename &dirname); +use Cwd; + +# List explicitly here the variables you want Configure to +# generate. Metaconfig only looks for shell variables, so you +# have to mention them as if they were shell variables, not +# %Config entries. Thus you write +# $startperl +# to ensure Configure will look for $Config{startperl}. + +# This forces PL files to create target in same directory as PL file. +# This is so that make depend always knows where to find PL derivatives. +my $origdir = cwd; +chdir dirname($0); +my $file = basename($0, '.PL'); +$file .= '.com' if $^O eq 'VMS'; + +open OUT, ">", $file or die "Can't create $file: $!"; + +print "Extracting $file (with variable substitutions)\n"; + +# In this section, perl variables will be expanded during extraction. +# You can use $Config{...} to use Configure variables. + +print OUT <<"!GROK!THIS!"; +$Config{startperl} + eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; +!GROK!THIS! + +use File::Spec; + +my $script = File::Spec->catfile( + File::Spec->catdir( + File::Spec->updir, qw[ cpan IO-Compress bin ] + ), "streamzip"); + +if (open(IN, '<', $script)) { + print OUT ; + close IN; +} else { + die "$0: cannot find '$script'\n"; +} + +close OUT or die "Can't close $file: $!"; +chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; +exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; +chdir $origdir; diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index bc14f124ea9a..66b2bfa2fd57 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -291,7 +291,7 @@ utils1 = [.utils]perldoc.com [.utils]h2ph.com utils2 = [.utils]h2xs.com [.utils]libnetcfg.com [.lib]perlbug.com [.utils]json_pp.com utils3 = [.utils]perlivp.com [.lib]splain.com [.utils]pl2pm.com [.utils]xsubpp.com [.utils]pod2html.com [.utils]instmodsh.com utils4 = [.utils]enc2xs.com [.utils]piconv.com [.utils]cpan.com [.utils]prove.com [.utils]ptar.com [.utils]ptardiff.com [.utils]shasum.com -utils5 = [.utils]corelist.com [.utils]ptargrep.com [.utils]zipdetails.com [.utils]encguess.com +utils5 = [.utils]corelist.com [.utils]ptargrep.com [.utils]zipdetails.com [.utils]encguess.com [.utils]streamzip.com all : base extras archcorefiles preplibrary [.pod]perltoc.pod @ QUALIFIERS := $(MMSQUALIFIERS) @@ -510,6 +510,9 @@ nonxsext : $(LIBPREREQ) preplibrary $(MINIPERL_EXE) [.pod]perlfunc.pod [.utils]zipdetails.com : [.utils]zipdetails.PL $(ARCHDIR)Config.pm nonxsext $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE) +[.utils]streamzip.com : [.utils]streamzip.PL $(ARCHDIR)Config.pm nonxsext + $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE) + [.utils]pod2html.com : [.utils]pod2html.PL $(ARCHDIR)Config.pm nonxsext $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE) diff --git a/win32/Makefile b/win32/Makefile index 219ebc4a260f..80ce9e41de22 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -733,6 +733,7 @@ UTILS = \ ..\utils\instmodsh \ ..\utils\json_pp \ ..\utils\pod2html \ + ..\utils\streamzip \ bin\exetype.pl \ bin\runperl.pl \ bin\pl2bat.pl \ @@ -1374,7 +1375,7 @@ distclean: realclean perltru64.pod perltw.pod perluniprops.pod perlvos.pod \ perlwin32.pod -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \ - perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \ + perldoc perlivp libnetcfg enc2xs encguess piconv cpan streamzip *.bat \ xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ perlmainst.c diff --git a/win32/makefile.mk b/win32/makefile.mk index 003b524dd33c..df37e345e7ba 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -939,6 +939,7 @@ UTILS = \ ..\utils\shasum \ ..\utils\instmodsh \ ..\utils\json_pp \ + ..\utils\streamzip \ bin\exetype.pl \ bin\runperl.pl \ bin\pl2bat.pl \ @@ -1772,7 +1773,7 @@ distclean: realclean perltru64.pod perltw.pod perluniprops.pod perlvos.pod \ perlwin32.pod -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \ - perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \ + perldoc perlivp libnetcfg enc2xs encguess piconv cpan streamzip *.bat \ xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ perlmainst.c