From 5888abcc0224fc84db13ec9fe37d2dcf1a8e6eb2 Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Wed, 20 Jul 2022 17:34:18 +0000 Subject: [PATCH] Update IO::Compress to CPAN 2.201 From ChangeLog 2.201 25 June 2022 * Disable zib header tests Sat Jun 25 09:10:59 2022 +0100 63eb5d37291b40dbf07d191a09b7876168008cd4 * Version 2.201 Sat Jun 25 09:00:42 2022 +0100 af51310f68bb225d94eaa29b7f3d2bece1935dfd * doc update https://github.com/pmqs/IO-Compress/issues/38 Thu Jun 23 23:00:31 2022 +0100 2002d4fd3b3a6f5de6c6c3dc5989cf42581c1758 * Changes for zlib-ng Thu Jun 23 22:43:50 2022 +0100 2bd52d2918823cc567c3e92dd3d15f87cb4ee8f8 * Add perl 5.36 Sun Jun 5 13:34:18 2022 +0100 ede55370ed4c7eb3c66abc71bc25c7e4019b4c44 * force streaming zip file when writing to stdout * https://github.com/pmqs/IO-Compress/issues/42 Sun Apr 24 19:43:19 2022 +0100 b57a3f83f404f5a24242680de5b406cfcf5c03ac * read zip timestamp in localtime Sun Apr 24 13:11:58 2022 +0100 0c838f43dc46f292714c82145c9add9932196b01 * streamzip: tighten up version tests for failing windows tests * https://github.com/pmqs/IO-Compress/issues/41 Sun Apr 24 12:49:57 2022 +0100 3497645228235ea12c4d559d6dedd4cef47fc94a * streamzip: update year Sun Apr 24 12:11:35 2022 +0100 0ac0d1ef603d8854ffc35976196735b663764992 * Use Time::Local instead of POSIX::mktime Tue Apr 19 11:31:43 2022 +0100 64a106f1119cbc7dec8db52dca016bb8baacf2d4 --- cpan/IO-Compress/Makefile.PL | 5 +- cpan/IO-Compress/bin/streamzip | 13 ++- cpan/IO-Compress/lib/Compress/Zlib.pm | 15 ++- .../lib/IO/Compress/Adapter/Bzip2.pm | 6 +- .../lib/IO/Compress/Adapter/Deflate.pm | 29 ++++- .../lib/IO/Compress/Adapter/Identity.pm | 4 +- cpan/IO-Compress/lib/IO/Compress/Base.pm | 4 +- .../lib/IO/Compress/Base/Common.pm | 2 +- cpan/IO-Compress/lib/IO/Compress/Bzip2.pm | 10 +- cpan/IO-Compress/lib/IO/Compress/Deflate.pm | 106 ++++-------------- cpan/IO-Compress/lib/IO/Compress/Gzip.pm | 15 ++- .../lib/IO/Compress/Gzip/Constants.pm | 2 +- .../IO-Compress/lib/IO/Compress/RawDeflate.pm | 13 ++- cpan/IO-Compress/lib/IO/Compress/Zip.pm | 75 ++++++++----- .../lib/IO/Compress/Zip/Constants.pm | 2 +- .../lib/IO/Compress/Zlib/Constants.pm | 2 +- .../IO-Compress/lib/IO/Compress/Zlib/Extra.pm | 4 +- .../lib/IO/Uncompress/Adapter/Bunzip2.pm | 6 +- .../lib/IO/Uncompress/Adapter/Identity.pm | 6 +- .../lib/IO/Uncompress/Adapter/Inflate.pm | 6 +- .../lib/IO/Uncompress/AnyInflate.pm | 19 ++-- .../lib/IO/Uncompress/AnyUncompress.pm | 46 ++++---- cpan/IO-Compress/lib/IO/Uncompress/Base.pm | 4 +- cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm | 8 +- cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm | 15 ++- cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm | 11 +- .../lib/IO/Uncompress/RawInflate.pm | 13 ++- cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm | 28 ++--- cpan/IO-Compress/t/000prereq.t | 6 +- cpan/IO-Compress/t/005defhdr.t | 11 +- cpan/IO-Compress/t/011-streamzip.t | 16 ++- cpan/IO-Compress/t/101truncate-rawdeflate.t | 6 +- cpan/IO-Compress/t/111const-deflate.t | 4 +- cpan/IO-Compress/t/cz-03zlib-v1.t | 3 +- 34 files changed, 270 insertions(+), 245 deletions(-) diff --git a/cpan/IO-Compress/Makefile.PL b/cpan/IO-Compress/Makefile.PL index 8e9acfe7cf5f..e9d20a412bdc 100644 --- a/cpan/IO-Compress/Makefile.PL +++ b/cpan/IO-Compress/Makefile.PL @@ -3,8 +3,8 @@ use strict ; require 5.006 ; -$::VERSION = '2.106' ; -$::DEP_VERSION = '2.103'; +$::VERSION = '2.201' ; +$::DEP_VERSION = '2.201'; use lib '.'; use private::MakeUtil; @@ -29,6 +29,7 @@ WriteMakefile( 'Compress::Raw::Zlib' => $::DEP_VERSION, 'Scalar::Util' => 0, 'Encode' => 0, + 'Time::Local' => 0, $] >= 5.005 && $] < 5.006 ? ('File::BSDGlob' => 0) : () } diff --git a/cpan/IO-Compress/bin/streamzip b/cpan/IO-Compress/bin/streamzip index d0f92fb620e7..199599ee38ea 100644 --- a/cpan/IO-Compress/bin/streamzip +++ b/cpan/IO-Compress/bin/streamzip @@ -12,7 +12,7 @@ use IO::Compress::Zip qw(zip use Getopt::Long; -my $VERSION = '1.002'; +my $VERSION = '1.00'; my $compression_method = ZIP_CM_DEFLATE; my $stream = 0; @@ -51,6 +51,10 @@ if ($compression_method == ZIP_CM_DEFLATE && defined $level) push @extraOpts, (Level => $level) } +# force streaming zip file when writing to stdout. +$stream = 1 + if $zipfile eq '-'; + zip '-' => $zipfile, Name => $memberName, Zip64 => $zip64, @@ -107,7 +111,8 @@ Usage: producer | streamzip [OPTIONS] | consumer producer | streamzip [OPTIONS] -zipfile output.zip -Stream data from stdin, compress into a Zip container, and stream to stdout. +Stream data from stdin, compress into a Zip container, and either stream to stdout, or +write to a named file. OPTIONS @@ -131,7 +136,7 @@ OPTIONS zstd Use LZMA compression [needs IO::Compress::Zstd] -version Display version number [$VERSION] -Copyright (c) 2019-2021 Paul Marquess. All rights reserved. +Copyright (c) 2019-2022 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. @@ -287,7 +292,7 @@ Paul Marquess F. =head1 COPYRIGHT -Copyright (c) 2019-2021 Paul Marquess. All rights reserved. +Copyright (c) 2019-2022 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/lib/Compress/Zlib.pm b/cpan/IO-Compress/lib/Compress/Zlib.pm index 37aa051557d8..59dfbf6d1b16 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.106 ; -use Compress::Raw::Zlib 2.103 ; -use IO::Compress::Gzip 2.106 ; -use IO::Uncompress::Gunzip 2.106 ; +use IO::Compress::Base::Common 2.201 ; +use Compress::Raw::Zlib 2.201 ; +use IO::Compress::Gzip 2.201 ; +use IO::Uncompress::Gunzip 2.201 ; use strict ; use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.106'; +$VERSION = '2.201'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -461,7 +461,7 @@ sub inflate package Compress::Zlib ; -use IO::Compress::Gzip::Constants 2.106 ; +use IO::Compress::Gzip::Constants 2.201 ; sub memGzip($) { @@ -1494,6 +1494,9 @@ C and Mark Adler C. The primary site for the I compression library is L. +The primary site for the I compression library is +L. + The primary site for gzip is L. =head1 AUTHOR diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm index cc1700aab260..3ff2b4f57f2e 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.106 qw(:Status); +use IO::Compress::Base::Common 2.201 qw(:Status); -use Compress::Raw::Bzip2 2.103 ; +use Compress::Raw::Bzip2 2.201 ; our ($VERSION); -$VERSION = '2.106'; +$VERSION = '2.201'; 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 12f97ccc52d9..08555e944139 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.106 qw(:Status); -use Compress::Raw::Zlib 2.103 qw( !crc32 !adler32 ) ; +use IO::Compress::Base::Common 2.201 qw(:Status); +use Compress::Raw::Zlib 2.201 qw( !crc32 !adler32 ) ; require Exporter; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, @EXPORT, %DEFLATE_CONSTANTS); -$VERSION = '2.106'; +$VERSION = '2.201'; @ISA = qw(Exporter); @EXPORT_OK = @Compress::Raw::Zlib::DEFLATE_CONSTANTS; %EXPORT_TAGS = %Compress::Raw::Zlib::DEFLATE_CONSTANTS; @@ -40,6 +40,29 @@ sub mkCompObject } ; } +sub mkCompObject1 +{ + my $crc32 = shift ; + my $adler32 = shift ; + my $level = shift ; + my $strategy = shift ; + + my ($def, $status) = Compress::Raw::Zlib::Deflate->new( + -AppendOutput => 1, + -CRC32 => $crc32, + -ADLER32 => $adler32, + -Level => $level, + -Strategy => $strategy, + -WindowBits => MAX_WBITS); + + return (undef, "Cannot create Deflate object: $status", $status) + if $status != Z_OK; + + return bless {'Def' => $def, + 'Error' => '', + } ; +} + sub compr { my $self = shift ; diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm index a21962ea1aa1..99263d02a73e 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.106 qw(:Status); +use IO::Compress::Base::Common 2.201 qw(:Status); our ($VERSION); -$VERSION = '2.106'; +$VERSION = '2.201'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Base.pm b/cpan/IO-Compress/lib/IO/Compress/Base.pm index fdb169d7716a..8941c271cdd4 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.106 ; +use IO::Compress::Base::Common 2.201 ; use IO::File (); ; use Scalar::Util (); @@ -20,7 +20,7 @@ use Symbol(); our (@ISA, $VERSION); @ISA = qw(IO::File Exporter); -$VERSION = '2.106'; +$VERSION = '2.201'; #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16. diff --git a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm index 39ac01685896..7374ce457757 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.106'; +$VERSION = '2.201'; @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 faf043b15404..7c18059d8411 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.106 ; +use IO::Compress::Base 2.201 ; -use IO::Compress::Base::Common 2.106 qw(); -use IO::Compress::Adapter::Bzip2 2.106 ; +use IO::Compress::Base::Common 2.201 qw(); +use IO::Compress::Adapter::Bzip2 2.201 ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); -$VERSION = '2.106'; +$VERSION = '2.201'; $Bzip2Error = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -51,7 +51,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.106 qw(:Parse); + use IO::Compress::Base::Common 2.201 qw(:Parse); return ( 'blocksize100k' => [IO::Compress::Base::Common::Parse_unsigned, 1], diff --git a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm index 0998952b4de9..4f239ed34f37 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.106 (); -use IO::Compress::Adapter::Deflate 2.106 ; +use IO::Compress::RawDeflate 2.201 (); +use IO::Compress::Adapter::Deflate 2.201 ; -use IO::Compress::Zlib::Constants 2.106 ; -use IO::Compress::Base::Common 2.106 qw(); +use IO::Compress::Zlib::Constants 2.201 ; +use IO::Compress::Base::Common 2.201 qw(); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $DeflateError); -$VERSION = '2.106'; +$VERSION = '2.201'; $DeflateError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -42,92 +42,35 @@ sub deflate return $obj->_def(@_); } - -sub bitmask($$$$) -{ - my $into = shift ; - my $value = shift ; - my $offset = shift ; - my $mask = shift ; - - return $into | (($value & $mask) << $offset ) ; -} - -sub mkDeflateHdr($$$;$) -{ - my $method = shift ; - my $cinfo = shift; - my $level = shift; - my $fdict_adler = shift ; - - my $cmf = 0; - my $flg = 0; - my $fdict = 0; - $fdict = 1 if defined $fdict_adler; - - $cmf = bitmask($cmf, $method, ZLIB_CMF_CM_OFFSET, ZLIB_CMF_CM_BITS); - $cmf = bitmask($cmf, $cinfo, ZLIB_CMF_CINFO_OFFSET, ZLIB_CMF_CINFO_BITS); - - $flg = bitmask($flg, $fdict, ZLIB_FLG_FDICT_OFFSET, ZLIB_FLG_FDICT_BITS); - $flg = bitmask($flg, $level, ZLIB_FLG_LEVEL_OFFSET, ZLIB_FLG_LEVEL_BITS); - - my $fcheck = 31 - ($cmf * 256 + $flg) % 31 ; - $flg = bitmask($flg, $fcheck, ZLIB_FLG_FCHECK_OFFSET, ZLIB_FLG_FCHECK_BITS); - - my $hdr = pack("CC", $cmf, $flg) ; - $hdr .= pack("N", $fdict_adler) if $fdict ; - - return $hdr; -} - -sub mkHeader +sub mkComp { my $self = shift ; - my $param = shift ; + my $got = shift ; - my $level = $param->getValue('level'); - my $strategy = $param->getValue('strategy'); + my ($obj, $errstr, $errno) = IO::Compress::Adapter::Deflate::mkCompObject1( + $got->getValue('crc32'), + $got->getValue('adler32'), + $got->getValue('level'), + $got->getValue('strategy') + ); - my $lflag ; - $level = 6 - if $level == Z_DEFAULT_COMPRESSION ; + return $self->saveErrorString(undef, $errstr, $errno) + if ! defined $obj; - if (ZLIB_VERNUM >= 0x1210) - { - if ($strategy >= Z_HUFFMAN_ONLY || $level < 2) - { $lflag = ZLIB_FLG_LEVEL_FASTEST } - elsif ($level < 6) - { $lflag = ZLIB_FLG_LEVEL_FAST } - elsif ($level == 6) - { $lflag = ZLIB_FLG_LEVEL_DEFAULT } - else - { $lflag = ZLIB_FLG_LEVEL_SLOWEST } - } - else - { - $lflag = ($level - 1) >> 1 ; - $lflag = 3 if $lflag > 3 ; - } - - #my $wbits = (MAX_WBITS - 8) << 4 ; - my $wbits = 7; - mkDeflateHdr(ZLIB_CMF_CM_DEFLATED, $wbits, $lflag); + return $obj; } -sub ckParams + +sub mkHeader { my $self = shift ; - my $got = shift; - - $got->setValue('adler32' => 1); - return 1 ; + return ''; } - sub mkTrailer { my $self = shift ; - return pack("N", *$self->{Compress}->adler32()) ; + return ''; } sub mkFinalTrailer @@ -135,12 +78,6 @@ sub mkFinalTrailer return ''; } -#sub newHeader -#{ -# my $self = shift ; -# return *$self->{Header}; -#} - sub getExtraParams { my $self = shift ; @@ -940,6 +877,9 @@ C and Mark Adler C. The primary site for the I compression library is L. +The primary site for the I compression library is +L. + The primary site for gzip is L. =head1 AUTHOR diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm index 0471e33ea7a5..e81106692e0d 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.106 () ; -use IO::Compress::Adapter::Deflate 2.106 ; +use IO::Compress::RawDeflate 2.201 () ; +use IO::Compress::Adapter::Deflate 2.201 ; -use IO::Compress::Base::Common 2.106 qw(:Status ); -use IO::Compress::Gzip::Constants 2.106 ; -use IO::Compress::Zlib::Extra 2.106 ; +use IO::Compress::Base::Common 2.201 qw(:Status ); +use IO::Compress::Gzip::Constants 2.201 ; +use IO::Compress::Zlib::Extra 2.201 ; BEGIN { @@ -25,7 +25,7 @@ BEGIN our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $GzipError); -$VERSION = '2.106'; +$VERSION = '2.201'; $GzipError = '' ; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -1252,6 +1252,9 @@ C and Mark Adler C. The primary site for the I compression library is L. +The primary site for the I compression library is +L. + The primary site for gzip is L. =head1 AUTHOR diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm index 8e32e17d590a..c9c6866e730a 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.106'; +$VERSION = '2.201'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm index de0f332ecb83..ee9079989aca 100644 --- a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm @@ -6,16 +6,16 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base 2.106 ; -use IO::Compress::Base::Common 2.106 qw(:Status :Parse); -use IO::Compress::Adapter::Deflate 2.106 ; -use Compress::Raw::Zlib 2.103 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); +use IO::Compress::Base 2.201 ; +use IO::Compress::Base::Common 2.201 qw(:Status :Parse); +use IO::Compress::Adapter::Deflate 2.201 ; +use Compress::Raw::Zlib 2.201 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.106'; +$VERSION = '2.201'; $RawDeflateError = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -995,6 +995,9 @@ C and Mark Adler C. The primary site for the I compression library is L. +The primary site for the I compression library is +L. + The primary site for gzip is L. =head1 AUTHOR diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip.pm b/cpan/IO-Compress/lib/IO/Compress/Zip.pm index ecba767727bc..0f33e7b82a3d 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip.pm @@ -4,41 +4,41 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.106 qw(:Status ); -use IO::Compress::RawDeflate 2.106 (); -use IO::Compress::Adapter::Deflate 2.106 ; -use IO::Compress::Adapter::Identity 2.106 ; -use IO::Compress::Zlib::Extra 2.106 ; -use IO::Compress::Zip::Constants 2.106 ; +use IO::Compress::Base::Common 2.201 qw(:Status ); +use IO::Compress::RawDeflate 2.201 (); +use IO::Compress::Adapter::Deflate 2.201 ; +use IO::Compress::Adapter::Identity 2.201 ; +use IO::Compress::Zlib::Extra 2.201 ; +use IO::Compress::Zip::Constants 2.201 ; use File::Spec(); use Config; -use Compress::Raw::Zlib 2.103 (); +use Compress::Raw::Zlib 2.201 (); BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - IO::Compress::Adapter::Bzip2->import( 2.103 ); + IO::Compress::Adapter::Bzip2->import( 2.201 ); require IO::Compress::Bzip2 ; - IO::Compress::Bzip2->import( 2.103 ); + IO::Compress::Bzip2->import( 2.201 ); } ; eval { require IO::Compress::Adapter::Lzma ; - IO::Compress::Adapter::Lzma->import( 2.103 ); + IO::Compress::Adapter::Lzma->import( 2.201 ); require IO::Compress::Lzma ; - IO::Compress::Lzma->import( 2.103 ); + IO::Compress::Lzma->import( 2.201 ); } ; eval { require IO::Compress::Adapter::Xz ; - IO::Compress::Adapter::Xz->import( 2.103 ); + IO::Compress::Adapter::Xz->import( 2.201 ); require IO::Compress::Xz ; - IO::Compress::Xz->import( 2.103 ); + IO::Compress::Xz->import( 2.201 ); } ; eval { require IO::Compress::Adapter::Zstd ; - IO::Compress::Adapter::Zstd->import( 2.103 ); + IO::Compress::Adapter::Zstd->import( 2.201 ); require IO::Compress::Zstd ; - IO::Compress::Zstd->import( 2.103 ); + IO::Compress::Zstd->import( 2.201 ); } ; } @@ -47,7 +47,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $ZipError); -$VERSION = '2.106'; +$VERSION = '2.201'; $ZipError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -85,20 +85,24 @@ sub isMethodAvailable if $method == ZIP_CM_STORE || $method == ZIP_CM_DEFLATE ; return 1 - if $method == ZIP_CM_BZIP2 and - defined $IO::Compress::Adapter::Bzip2::VERSION; + if $method == ZIP_CM_BZIP2 && + defined $IO::Compress::Adapter::Bzip2::VERSION && + defined &{ "IO::Compress::Adapter::Bzip2::mkRawZipCompObject" }; return 1 - if $method == ZIP_CM_LZMA and - defined $IO::Compress::Adapter::Lzma::VERSION; + if $method == ZIP_CM_LZMA && + defined $IO::Compress::Adapter::Lzma::VERSION && + defined &{ "IO::Compress::Adapter::Lzma::mkRawZipCompObject" }; return 1 - if $method == ZIP_CM_XZ and - defined $IO::Compress::Adapter::Xz::VERSION; + if $method == ZIP_CM_XZ && + defined $IO::Compress::Adapter::Xz::VERSION && + defined &{ "IO::Compress::Adapter::Xz::mkRawZipCompObject" }; return 1 - if $method == ZIP_CM_ZSTD and - defined $IO::Compress::Adapter::ZSTD::VERSION; + if $method == ZIP_CM_ZSTD && + defined $IO::Compress::Adapter::ZSTD::VERSION && + defined &{ "IO::Compress::Adapter::ZSTD::mkRawZipCompObject" }; return 0; } @@ -1053,12 +1057,24 @@ See L for more details. If the C<$input_filename_or_reference> parameter is any other type, C will be returned. -In addition, if C<$input_filename_or_reference> is a simple filename, -the default values for -the C, C