exiftool-vendored.exe 12.82.0 → 12.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/exiftool.exe +0 -0
- package/bin/exiftool_files/Changes +37 -0
- package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
- package/bin/exiftool_files/README +3 -2
- package/bin/exiftool_files/build_geolocation +872 -0
- package/bin/exiftool_files/config_files/example.config +2 -2
- package/bin/exiftool_files/exiftool.pl +28 -6
- package/bin/exiftool_files/fmt_files/gpx.fmt +2 -1
- package/bin/exiftool_files/fmt_files/gpx_wpt.fmt +2 -1
- package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
- package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
- package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
- package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
- package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
- package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
- package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
- package/bin/exiftool_files/lib/B.pm +1 -1
- package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
- package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
- package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
- package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
- package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
- package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
- package/bin/exiftool_files/lib/Config.pm +9 -9
- package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
- package/bin/exiftool_files/lib/CryptX.pm +2 -82
- package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
- package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
- package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
- package/bin/exiftool_files/lib/Digest/base.pm +26 -20
- package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
- package/bin/exiftool_files/lib/Encode.pm +3 -3
- package/bin/exiftool_files/lib/Errno.pm +13 -13
- package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
- package/bin/exiftool_files/lib/Exporter.pm +1 -1
- package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
- package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
- package/bin/exiftool_files/lib/File/Find.pm +1 -1
- package/bin/exiftool_files/lib/File/Glob.pm +1 -8
- package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
- package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
- package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
- package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
- package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
- package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
- package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
- package/bin/exiftool_files/lib/File/Path.pm +3 -3
- package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
- package/bin/exiftool_files/lib/File/Temp.pm +70 -35
- package/bin/exiftool_files/lib/File/Which.pm +1 -240
- package/bin/exiftool_files/lib/File/stat.pm +3 -2
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
- package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
- package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
- package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
- package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
- package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
- package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
- package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
- package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
- package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
- package/bin/exiftool_files/lib/IO/File.pm +1 -1
- package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
- package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
- package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
- package/bin/exiftool_files/lib/IO/Select.pm +16 -2
- package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
- package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
- package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
- package/bin/exiftool_files/lib/IO/String.pm +425 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
- package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
- package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
- package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
- package/bin/exiftool_files/lib/IO.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Apple.pm +51 -7
- package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +5 -2
- package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +18 -5
- package/bin/exiftool_files/lib/Image/ExifTool/DJI.pm +29 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +19 -2
- package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +17 -8
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +163 -101
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +18 -10
- package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +7 -6
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +6 -1
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +5 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +15 -6
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +18 -9
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +24 -5
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +2 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +165 -132
- package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +3 -0
- package/bin/exiftool_files/lib/Image/ExifTool.pm +45 -23
- package/bin/exiftool_files/lib/Image/ExifTool.pod +23 -14
- package/bin/exiftool_files/lib/List/Util.pm +97 -8
- package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
- package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
- package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
- package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
- package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
- package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
- package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
- package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
- package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
- package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
- package/bin/exiftool_files/lib/POSIX.pm +1 -1
- package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
- package/bin/exiftool_files/lib/PerlIO.pm +397 -0
- package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
- package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
- package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
- package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
- package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
- package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
- package/bin/exiftool_files/lib/Portable.pm +246 -320
- package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
- package/bin/exiftool_files/lib/Socket.pm +16 -12
- package/bin/exiftool_files/lib/Storable.pm +1444 -1441
- package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
- package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
- package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
- package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
- package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
- package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
- package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
- package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
- package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
- package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
- package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
- package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
- package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
- package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
- package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
- package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
- package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
- package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
- package/bin/exiftool_files/lib/Test/More.pm +1997 -0
- package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
- package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
- package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
- package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
- package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
- package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
- package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
- package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
- package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
- package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
- package/bin/exiftool_files/lib/Time/Local.pm +82 -35
- package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
- package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
- package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
- package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
- package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
- package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
- package/bin/exiftool_files/lib/Win32/API.pm +1 -830
- package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
- package/bin/exiftool_files/lib/Win32.pm +213 -89
- package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
- package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
- package/bin/exiftool_files/lib/feature.pm +49 -17
- package/bin/exiftool_files/lib/mro.pm +4 -20
- package/bin/exiftool_files/lib/overload.pm +15 -15
- package/bin/exiftool_files/lib/parent.pm +10 -2
- package/bin/exiftool_files/lib/re.pm +91 -33
- package/bin/exiftool_files/lib/warnings.pm +17 -6
- package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
- package/bin/exiftool_files/liblzma-5__.dll +0 -0
- package/bin/exiftool_files/libstdc++-6.dll +0 -0
- package/bin/exiftool_files/libwinpthread-1.dll +0 -0
- package/bin/exiftool_files/perl.exe +0 -0
- package/bin/exiftool_files/perl532.dll +0 -0
- package/package.json +6 -4
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/cs.pm +0 -978
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/de.pm +0 -1975
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_ca.pm +0 -44
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/en_gb.pm +0 -124
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/es.pm +0 -2921
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fi.pm +0 -1116
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/fr.pm +0 -3171
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/it.pm +0 -2750
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ja.pm +0 -10256
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ko.pm +0 -4499
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/nl.pm +0 -1270
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/pl.pm +0 -3019
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/ru.pm +0 -18220
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sk.pm +0 -441
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/sv.pm +0 -714
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/tr.pm +0 -452
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_cn.pm +0 -2225
- package/bin/exiftool_files/lib/Image/ExifTool/GeoLang/zh_tw.pm +0 -72
- package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
- package/bin/exiftool_files/perl530.dll +0 -0
|
@@ -4,13 +4,13 @@ use strict;
|
|
|
4
4
|
use warnings;
|
|
5
5
|
use bytes;
|
|
6
6
|
|
|
7
|
-
use IO::Compress::Base::Common 2.
|
|
8
|
-
use Compress::Raw::Zlib 2.
|
|
9
|
-
|
|
10
|
-
require Exporter;
|
|
7
|
+
use IO::Compress::Base::Common 2.100 qw(:Status);
|
|
8
|
+
use Compress::Raw::Zlib 2.100 qw( !crc32 !adler32 ) ;
|
|
9
|
+
|
|
10
|
+
require Exporter;
|
|
11
11
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, @EXPORT, %DEFLATE_CONSTANTS);
|
|
12
12
|
|
|
13
|
-
$VERSION = '2.
|
|
13
|
+
$VERSION = '2.100';
|
|
14
14
|
@ISA = qw(Exporter);
|
|
15
15
|
@EXPORT_OK = @Compress::Raw::Zlib::DEFLATE_CONSTANTS;
|
|
16
16
|
%EXPORT_TAGS = %Compress::Raw::Zlib::DEFLATE_CONSTANTS;
|
|
@@ -24,20 +24,20 @@ sub mkCompObject
|
|
|
24
24
|
my $level = shift ;
|
|
25
25
|
my $strategy = shift ;
|
|
26
26
|
|
|
27
|
-
my ($def, $status) =
|
|
27
|
+
my ($def, $status) = Compress::Raw::Zlib::Deflate->new(
|
|
28
28
|
-AppendOutput => 1,
|
|
29
29
|
-CRC32 => $crc32,
|
|
30
30
|
-ADLER32 => $adler32,
|
|
31
31
|
-Level => $level,
|
|
32
32
|
-Strategy => $strategy,
|
|
33
|
-
-WindowBits => - MAX_WBITS;
|
|
33
|
+
-WindowBits => - MAX_WBITS);
|
|
34
34
|
|
|
35
|
-
return (undef, "Cannot create Deflate object: $status", $status)
|
|
36
|
-
if $status != Z_OK;
|
|
35
|
+
return (undef, "Cannot create Deflate object: $status", $status)
|
|
36
|
+
if $status != Z_OK;
|
|
37
37
|
|
|
38
38
|
return bless {'Def' => $def,
|
|
39
39
|
'Error' => '',
|
|
40
|
-
} ;
|
|
40
|
+
} ;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
sub compr
|
|
@@ -51,11 +51,11 @@ sub compr
|
|
|
51
51
|
|
|
52
52
|
if ($status != Z_OK)
|
|
53
53
|
{
|
|
54
|
-
$self->{Error} = "Deflate Error: $status";
|
|
54
|
+
$self->{Error} = "Deflate Error: $status";
|
|
55
55
|
return STATUS_ERROR;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return STATUS_OK;
|
|
58
|
+
return STATUS_OK;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
sub flush
|
|
@@ -70,11 +70,11 @@ sub flush
|
|
|
70
70
|
|
|
71
71
|
if ($status != Z_OK)
|
|
72
72
|
{
|
|
73
|
-
$self->{Error} = "Deflate Error: $status";
|
|
73
|
+
$self->{Error} = "Deflate Error: $status";
|
|
74
74
|
return STATUS_ERROR;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
return STATUS_OK;
|
|
77
|
+
return STATUS_OK;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
sub close
|
|
@@ -97,14 +97,14 @@ sub reset
|
|
|
97
97
|
$self->{ErrorNo} = $status;
|
|
98
98
|
if ($status != Z_OK)
|
|
99
99
|
{
|
|
100
|
-
$self->{Error} = "Deflate Error: $status";
|
|
100
|
+
$self->{Error} = "Deflate Error: $status";
|
|
101
101
|
return STATUS_ERROR;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
return STATUS_OK;
|
|
104
|
+
return STATUS_OK;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
sub deflateParams
|
|
107
|
+
sub deflateParams
|
|
108
108
|
{
|
|
109
109
|
my $self = shift ;
|
|
110
110
|
|
|
@@ -114,11 +114,11 @@ sub deflateParams
|
|
|
114
114
|
$self->{ErrorNo} = $status;
|
|
115
115
|
if ($status != Z_OK)
|
|
116
116
|
{
|
|
117
|
-
$self->{Error} = "deflateParams Error: $status";
|
|
117
|
+
$self->{Error} = "deflateParams Error: $status";
|
|
118
118
|
return STATUS_ERROR;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
return STATUS_OK;
|
|
121
|
+
return STATUS_OK;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
|
|
@@ -167,4 +167,3 @@ sub adler32
|
|
|
167
167
|
1;
|
|
168
168
|
|
|
169
169
|
__END__
|
|
170
|
-
|
|
@@ -11,7 +11,7 @@ use File::GlobMapper;
|
|
|
11
11
|
require Exporter;
|
|
12
12
|
our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE);
|
|
13
13
|
@ISA = qw(Exporter);
|
|
14
|
-
$VERSION = '2.
|
|
14
|
+
$VERSION = '2.100';
|
|
15
15
|
|
|
16
16
|
@EXPORT = qw( isaFilehandle isaFilename isaScalar
|
|
17
17
|
whatIsInput whatIsOutput
|
|
@@ -160,7 +160,7 @@ sub whatIsInput($;$)
|
|
|
160
160
|
#use IO::File;
|
|
161
161
|
$got = 'handle';
|
|
162
162
|
$_[0] = *STDIN;
|
|
163
|
-
#$_[0] =
|
|
163
|
+
#$_[0] = IO::File->new("<-");
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
return $got;
|
|
@@ -174,7 +174,7 @@ sub whatIsOutput($;$)
|
|
|
174
174
|
{
|
|
175
175
|
$got = 'handle';
|
|
176
176
|
$_[0] = *STDOUT;
|
|
177
|
-
#$_[0] =
|
|
177
|
+
#$_[0] = IO::File->new(">-");
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
return $got;
|
|
@@ -267,7 +267,7 @@ sub IO::Compress::Base::Validator::new
|
|
|
267
267
|
{
|
|
268
268
|
$data{GlobMap} = 1 ;
|
|
269
269
|
$data{inType} = $data{outType} = 'filename';
|
|
270
|
-
my $mapper =
|
|
270
|
+
my $mapper = File::GlobMapper->new($_[0], $_[1]);
|
|
271
271
|
if ( ! $mapper )
|
|
272
272
|
{
|
|
273
273
|
return $obj->saveErrorString($File::GlobMapper::Error) ;
|
|
@@ -509,7 +509,7 @@ sub ParseParameters
|
|
|
509
509
|
return $_[1]
|
|
510
510
|
if @_ == 2 && defined $_[1] && UNIVERSAL::isa($_[1], "IO::Compress::Base::Parameters");
|
|
511
511
|
|
|
512
|
-
my $p =
|
|
512
|
+
my $p = IO::Compress::Base::Parameters->new();
|
|
513
513
|
$p->parse(@_)
|
|
514
514
|
or croak "$sub: $p->[IxError]" ;
|
|
515
515
|
|
|
@@ -6,7 +6,7 @@ require 5.006 ;
|
|
|
6
6
|
use strict ;
|
|
7
7
|
use warnings;
|
|
8
8
|
|
|
9
|
-
use IO::Compress::Base::Common 2.
|
|
9
|
+
use IO::Compress::Base::Common 2.100 ;
|
|
10
10
|
|
|
11
11
|
use IO::File (); ;
|
|
12
12
|
use Scalar::Util ();
|
|
@@ -20,7 +20,7 @@ use Symbol();
|
|
|
20
20
|
our (@ISA, $VERSION);
|
|
21
21
|
@ISA = qw(IO::File Exporter);
|
|
22
22
|
|
|
23
|
-
$VERSION = '2.
|
|
23
|
+
$VERSION = '2.100';
|
|
24
24
|
|
|
25
25
|
#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.
|
|
26
26
|
|
|
@@ -254,8 +254,8 @@ sub _create
|
|
|
254
254
|
*$obj->{Compress} = $obj->mkComp($got)
|
|
255
255
|
or return undef;
|
|
256
256
|
|
|
257
|
-
*$obj->{UnCompSize} = new
|
|
258
|
-
*$obj->{CompSize} = new
|
|
257
|
+
*$obj->{UnCompSize} = U64->new;
|
|
258
|
+
*$obj->{CompSize} = U64->new;
|
|
259
259
|
|
|
260
260
|
if ( $outType eq 'buffer') {
|
|
261
261
|
${ *$obj->{Buffer} } = ''
|
|
@@ -279,7 +279,7 @@ sub _create
|
|
|
279
279
|
my $mode = '>' ;
|
|
280
280
|
$mode = '>>'
|
|
281
281
|
if $appendOutput;
|
|
282
|
-
*$obj->{FH} =
|
|
282
|
+
*$obj->{FH} = IO::File->new( "$mode $outValue" )
|
|
283
283
|
or return $obj->saveErrorString(undef, "cannot open file '$outValue': $!", $!) ;
|
|
284
284
|
*$obj->{StdIO} = ($outValue eq '-');
|
|
285
285
|
setBinModeOutput(*$obj->{FH}) ;
|
|
@@ -340,7 +340,7 @@ sub _def
|
|
|
340
340
|
my $haveOut = @_ ;
|
|
341
341
|
my $output = shift ;
|
|
342
342
|
|
|
343
|
-
my $x =
|
|
343
|
+
my $x = IO::Compress::Base::Validator->new($class, *$obj->{Error}, $name, $input, $output)
|
|
344
344
|
or return undef ;
|
|
345
345
|
|
|
346
346
|
push @_, $output if $haveOut && $x->{Hash};
|
|
@@ -493,7 +493,7 @@ sub _wr2
|
|
|
493
493
|
|
|
494
494
|
if ( ! $isFilehandle )
|
|
495
495
|
{
|
|
496
|
-
$fh =
|
|
496
|
+
$fh = IO::File->new( "<$input" )
|
|
497
497
|
or return $self->saveErrorString(undef, "cannot open file '$input': $!", $!) ;
|
|
498
498
|
}
|
|
499
499
|
binmode $fh ;
|
|
@@ -983,23 +983,27 @@ sub _notAvailable
|
|
|
983
983
|
return sub { Carp::croak "$name Not Available: File opened only for output" ; } ;
|
|
984
984
|
}
|
|
985
985
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
*
|
|
992
|
-
|
|
993
|
-
*
|
|
994
|
-
*
|
|
995
|
-
|
|
996
|
-
*
|
|
997
|
-
*
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
986
|
+
{
|
|
987
|
+
no warnings 'once';
|
|
988
|
+
|
|
989
|
+
*read = _notAvailable('read');
|
|
990
|
+
*READ = _notAvailable('read');
|
|
991
|
+
*readline = _notAvailable('readline');
|
|
992
|
+
*READLINE = _notAvailable('readline');
|
|
993
|
+
*getc = _notAvailable('getc');
|
|
994
|
+
*GETC = _notAvailable('getc');
|
|
995
|
+
|
|
996
|
+
*FILENO = \&fileno;
|
|
997
|
+
*PRINT = \&print;
|
|
998
|
+
*PRINTF = \&printf;
|
|
999
|
+
*WRITE = \&syswrite;
|
|
1000
|
+
*write = \&syswrite;
|
|
1001
|
+
*SEEK = \&seek;
|
|
1002
|
+
*TELL = \&tell;
|
|
1003
|
+
*EOF = \&eof;
|
|
1004
|
+
*CLOSE = \&close;
|
|
1005
|
+
*BINMODE = \&binmode;
|
|
1006
|
+
}
|
|
1003
1007
|
|
|
1004
1008
|
#*sysread = \&_notAvailable;
|
|
1005
1009
|
#*syswrite = \&_write;
|
|
@@ -1021,6 +1025,12 @@ IO::Compress::Base - Base Class for IO::Compress modules
|
|
|
1021
1025
|
This module is not intended for direct use in application code. Its sole
|
|
1022
1026
|
purpose is to be sub-classed by IO::Compress modules.
|
|
1023
1027
|
|
|
1028
|
+
=head1 SUPPORT
|
|
1029
|
+
|
|
1030
|
+
General feedback/questions/bug reports should be sent to
|
|
1031
|
+
L<https://github.com/pmqs/IO-Compress/issues> (preferred) or
|
|
1032
|
+
L<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.
|
|
1033
|
+
|
|
1024
1034
|
=head1 SEE ALSO
|
|
1025
1035
|
|
|
1026
1036
|
L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
|
|
@@ -1041,8 +1051,7 @@ See the Changes file.
|
|
|
1041
1051
|
|
|
1042
1052
|
=head1 COPYRIGHT AND LICENSE
|
|
1043
1053
|
|
|
1044
|
-
Copyright (c) 2005-
|
|
1054
|
+
Copyright (c) 2005-2021 Paul Marquess. All rights reserved.
|
|
1045
1055
|
|
|
1046
1056
|
This program is free software; you can redistribute it and/or
|
|
1047
1057
|
modify it under the same terms as Perl itself.
|
|
1048
|
-
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
package IO::Compress::Brotli;
|
|
2
|
+
|
|
3
|
+
use 5.014000;
|
|
4
|
+
use strict;
|
|
5
|
+
use warnings;
|
|
6
|
+
use parent qw/Exporter/;
|
|
7
|
+
|
|
8
|
+
use IO::Uncompress::Brotli;
|
|
9
|
+
|
|
10
|
+
our @EXPORT = qw/bro/;
|
|
11
|
+
our @EXPORT_OK = @EXPORT;
|
|
12
|
+
|
|
13
|
+
our $VERSION = '0.004001';
|
|
14
|
+
|
|
15
|
+
my %BROTLI_ENCODER_MODE = ( generic => 0, text => 1, font => 2 );
|
|
16
|
+
sub mode {
|
|
17
|
+
my ($self, $mode) = @_;
|
|
18
|
+
|
|
19
|
+
die "Invalid encoder mode"
|
|
20
|
+
unless $BROTLI_ENCODER_MODE{$mode};
|
|
21
|
+
|
|
22
|
+
_mode($$self, $mode)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
1;
|
|
27
|
+
__END__
|
|
28
|
+
|
|
29
|
+
=encoding utf-8
|
|
30
|
+
|
|
31
|
+
=head1 NAME
|
|
32
|
+
|
|
33
|
+
IO::Compress::Brotli - Write Brotli buffers/streams
|
|
34
|
+
|
|
35
|
+
=head1 SYNOPSIS
|
|
36
|
+
|
|
37
|
+
use IO::Compress::Brotli;
|
|
38
|
+
|
|
39
|
+
# compress a buffer
|
|
40
|
+
my $encoded = bro $encoded;
|
|
41
|
+
|
|
42
|
+
# compress a stream
|
|
43
|
+
my $bro = IO::Compress::Brotli->create;
|
|
44
|
+
while(have_input()) {
|
|
45
|
+
my $block = get_input_block();
|
|
46
|
+
my $encoded_block = $bro->compress($block);
|
|
47
|
+
handle_output_block($encoded_block);
|
|
48
|
+
}
|
|
49
|
+
# Need to finish the steam
|
|
50
|
+
handle_output_block($bro->finish());
|
|
51
|
+
|
|
52
|
+
=head1 DESCRIPTION
|
|
53
|
+
|
|
54
|
+
IO::Compress::Brotli is a module that compressed Brotli buffers
|
|
55
|
+
and streams. Despite its name, it is not a subclass of
|
|
56
|
+
L<IO::Compress::Base> and does not implement its interface. This
|
|
57
|
+
will be rectified in a future release.
|
|
58
|
+
|
|
59
|
+
=head2 One-shot interface
|
|
60
|
+
|
|
61
|
+
If you have the whole buffer in a Perl scalar use the B<bro>
|
|
62
|
+
function.
|
|
63
|
+
|
|
64
|
+
=over
|
|
65
|
+
|
|
66
|
+
=item B<bro>(I<$input>)
|
|
67
|
+
|
|
68
|
+
Takes a whole uncompressed buffer as input and returns the compressed
|
|
69
|
+
data.
|
|
70
|
+
|
|
71
|
+
Exported by default.
|
|
72
|
+
|
|
73
|
+
=back
|
|
74
|
+
|
|
75
|
+
=head2 Streaming interface
|
|
76
|
+
|
|
77
|
+
If you want to process the data in blocks use the object oriented
|
|
78
|
+
interface. The available methods are:
|
|
79
|
+
|
|
80
|
+
=over
|
|
81
|
+
|
|
82
|
+
=item IO::Compress::Brotli->B<create>
|
|
83
|
+
|
|
84
|
+
Returns a IO::Compress::Brotli instance. Please note that a single
|
|
85
|
+
instance cannot be used to decompress multiple streams.
|
|
86
|
+
|
|
87
|
+
=item $bro->B<window>(I<$window>)
|
|
88
|
+
|
|
89
|
+
Sets the window parameter on the brotli encoder.
|
|
90
|
+
Defaults to BROTLI_DEFAULT_WINDOW (22).
|
|
91
|
+
|
|
92
|
+
=item $bro->B<quality>(I<$quality>)
|
|
93
|
+
|
|
94
|
+
Sets the quality paremeter on the brotli encoder.
|
|
95
|
+
Defaults to BROTLI_DEFAULT_QUALITY (11).
|
|
96
|
+
|
|
97
|
+
=item $bro->B<mode>(I<$mode>)
|
|
98
|
+
|
|
99
|
+
Sets the brotli encoder mode, which can be any of "generic",
|
|
100
|
+
"text" or "font". Defaults to "generic".
|
|
101
|
+
|
|
102
|
+
=item $bro->B<compress>(I<$block>)
|
|
103
|
+
|
|
104
|
+
Takes the a block of uncompressed data and returns a block of
|
|
105
|
+
compressed data. Dies on error.
|
|
106
|
+
|
|
107
|
+
=item $bro->B<flush>()
|
|
108
|
+
|
|
109
|
+
Flushes any pending output from the encoder.
|
|
110
|
+
|
|
111
|
+
=item $bro->B<finish>()
|
|
112
|
+
|
|
113
|
+
Tells the encoder to start the finish operation, and flushes
|
|
114
|
+
any remaining compressed output.
|
|
115
|
+
|
|
116
|
+
Once finish is called, the encoder cannot be used to compress
|
|
117
|
+
any more content.
|
|
118
|
+
|
|
119
|
+
B<NOTE>: Calling finish is B<required>, or the output might
|
|
120
|
+
remain unflushed, and the be missing termination marks.
|
|
121
|
+
|
|
122
|
+
=back
|
|
123
|
+
|
|
124
|
+
=head1 SEE ALSO
|
|
125
|
+
|
|
126
|
+
Brotli Compressed Data Format Internet-Draft:
|
|
127
|
+
L<https://www.ietf.org/id/draft-alakuijala-brotli-08.txt>
|
|
128
|
+
|
|
129
|
+
Brotli source code: L<https://github.com/google/brotli/>
|
|
130
|
+
|
|
131
|
+
=head1 AUTHOR
|
|
132
|
+
|
|
133
|
+
Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
|
|
134
|
+
|
|
135
|
+
The encoder bindings, modernisation of the decoder bindings and a
|
|
136
|
+
clean up of the overall project were contributed by:
|
|
137
|
+
|
|
138
|
+
=over
|
|
139
|
+
|
|
140
|
+
=item Quim Rovira, E<lt>quim@rovira.catE<gt>
|
|
141
|
+
|
|
142
|
+
=item Ævar Arnfjörð Bjarmason, E<lt>avarab@gmail.comE<gt>
|
|
143
|
+
|
|
144
|
+
=item Marcell Szathmári
|
|
145
|
+
|
|
146
|
+
=item Mattia Barbon, E<lt>mattia@barbon.orgE<gt>
|
|
147
|
+
|
|
148
|
+
=back
|
|
149
|
+
|
|
150
|
+
=head1 COPYRIGHT AND LICENSE
|
|
151
|
+
|
|
152
|
+
Copyright (C) 2015-2018 by Marius Gavrilescu
|
|
153
|
+
|
|
154
|
+
This library is free software; you can redistribute it and/or modify
|
|
155
|
+
it under the same terms as Perl itself, either Perl version 5.20.2 or,
|
|
156
|
+
at your option, any later version of Perl 5 you may have available.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
=cut
|
|
@@ -5,16 +5,16 @@ use warnings;
|
|
|
5
5
|
use bytes;
|
|
6
6
|
require Exporter ;
|
|
7
7
|
|
|
8
|
-
use IO::Compress::Base 2.
|
|
8
|
+
use IO::Compress::Base 2.100 ;
|
|
9
9
|
|
|
10
|
-
use IO::Compress::Base::Common 2.
|
|
11
|
-
use IO::Compress::Adapter::Bzip2 2.
|
|
10
|
+
use IO::Compress::Base::Common 2.100 qw();
|
|
11
|
+
use IO::Compress::Adapter::Bzip2 2.100 ;
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error);
|
|
16
16
|
|
|
17
|
-
$VERSION = '2.
|
|
17
|
+
$VERSION = '2.100';
|
|
18
18
|
$Bzip2Error = '';
|
|
19
19
|
|
|
20
20
|
@ISA = qw(IO::Compress::Base Exporter);
|
|
@@ -40,7 +40,7 @@ sub bzip2
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
sub mkHeader
|
|
43
|
+
sub mkHeader
|
|
44
44
|
{
|
|
45
45
|
my $self = shift ;
|
|
46
46
|
return '';
|
|
@@ -51,9 +51,9 @@ sub getExtraParams
|
|
|
51
51
|
{
|
|
52
52
|
my $self = shift ;
|
|
53
53
|
|
|
54
|
-
use IO::Compress::Base::Common 2.
|
|
55
|
-
|
|
56
|
-
return (
|
|
54
|
+
use IO::Compress::Base::Common 2.100 qw(:Parse);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
57
|
'blocksize100k' => [IO::Compress::Base::Common::Parse_unsigned, 1],
|
|
58
58
|
'workfactor' => [IO::Compress::Base::Common::Parse_unsigned, 0],
|
|
59
59
|
'verbosity' => [IO::Compress::Base::Common::Parse_boolean, 0],
|
|
@@ -66,7 +66,7 @@ sub ckParams
|
|
|
66
66
|
{
|
|
67
67
|
my $self = shift ;
|
|
68
68
|
my $got = shift;
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
# check that BlockSize100K is a number between 1 & 9
|
|
71
71
|
if ($got->parsed('blocksize100k')) {
|
|
72
72
|
my $value = $got->getValue('blocksize100k');
|
|
@@ -101,7 +101,7 @@ sub mkComp
|
|
|
101
101
|
|
|
102
102
|
return $self->saveErrorString(undef, $errstr, $errno)
|
|
103
103
|
if ! defined $obj;
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
return $obj;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -133,7 +133,7 @@ sub getFileInfo
|
|
|
133
133
|
my $self = shift ;
|
|
134
134
|
my $params = shift;
|
|
135
135
|
my $file = shift ;
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
1;
|
|
@@ -151,7 +151,7 @@ IO::Compress::Bzip2 - Write bzip2 files/buffers
|
|
|
151
151
|
my $status = bzip2 $input => $output [,OPTS]
|
|
152
152
|
or die "bzip2 failed: $Bzip2Error\n";
|
|
153
153
|
|
|
154
|
-
my $z =
|
|
154
|
+
my $z = IO::Compress::Bzip2->new( $output [,OPTS] )
|
|
155
155
|
or die "bzip2 failed: $Bzip2Error\n";
|
|
156
156
|
|
|
157
157
|
$z->print($string);
|
|
@@ -183,7 +183,6 @@ IO::Compress::Bzip2 - Write bzip2 files/buffers
|
|
|
183
183
|
binmode $z
|
|
184
184
|
fileno $z
|
|
185
185
|
close $z ;
|
|
186
|
-
|
|
187
186
|
|
|
188
187
|
=head1 DESCRIPTION
|
|
189
188
|
|
|
@@ -210,7 +209,8 @@ The functional interface needs Perl5.005 or better.
|
|
|
210
209
|
=head2 bzip2 $input_filename_or_reference => $output_filename_or_reference [, OPTS]
|
|
211
210
|
|
|
212
211
|
C<bzip2> expects at least two parameters,
|
|
213
|
-
C<$input_filename_or_reference> and C<$output_filename_or_reference
|
|
212
|
+
C<$input_filename_or_reference> and C<$output_filename_or_reference>
|
|
213
|
+
and zero or more optional parameters (see L</Optional Parameters>)
|
|
214
214
|
|
|
215
215
|
=head3 The C<$input_filename_or_reference> parameter
|
|
216
216
|
|
|
@@ -223,7 +223,7 @@ It can take one of the following forms:
|
|
|
223
223
|
|
|
224
224
|
=item A filename
|
|
225
225
|
|
|
226
|
-
If the <$input_filename_or_reference> parameter is a simple scalar, it is
|
|
226
|
+
If the C<$input_filename_or_reference> parameter is a simple scalar, it is
|
|
227
227
|
assumed to be a filename. This file will be opened for reading and the
|
|
228
228
|
input data will be read from it.
|
|
229
229
|
|
|
@@ -319,9 +319,9 @@ in C<$output_filename_or_reference> as a concatenated series of compressed data
|
|
|
319
319
|
|
|
320
320
|
=head2 Optional Parameters
|
|
321
321
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
L</"Constructor Options"> section below
|
|
322
|
+
The optional parameters for the one-shot function C<bzip2>
|
|
323
|
+
are (for the most part) identical to those used with the OO interface defined in the
|
|
324
|
+
L</"Constructor Options"> section. The exceptions are listed below
|
|
325
325
|
|
|
326
326
|
=over 5
|
|
327
327
|
|
|
@@ -389,6 +389,22 @@ Defaults to 0.
|
|
|
389
389
|
|
|
390
390
|
=head2 Examples
|
|
391
391
|
|
|
392
|
+
Here are a few example that show the capabilities of the module.
|
|
393
|
+
|
|
394
|
+
=head3 Streaming
|
|
395
|
+
|
|
396
|
+
This very simple command line example demonstrates the streaming capabilities of the module.
|
|
397
|
+
The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT.
|
|
398
|
+
|
|
399
|
+
$ echo hello world | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 \*STDIN => \*STDOUT' >output.bz2
|
|
400
|
+
|
|
401
|
+
The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>,
|
|
402
|
+
so the above can be rewritten as
|
|
403
|
+
|
|
404
|
+
$ echo hello world | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 "-" => "-"' >output.bz2
|
|
405
|
+
|
|
406
|
+
=head3 Compressing a file from the filesystem
|
|
407
|
+
|
|
392
408
|
To read the contents of the file C<file1.txt> and write the compressed
|
|
393
409
|
data to the file C<file1.txt.bz2>.
|
|
394
410
|
|
|
@@ -400,6 +416,8 @@ data to the file C<file1.txt.bz2>.
|
|
|
400
416
|
bzip2 $input => "$input.bz2"
|
|
401
417
|
or die "bzip2 failed: $Bzip2Error\n";
|
|
402
418
|
|
|
419
|
+
=head3 Reading from a Filehandle and writing to an in-memory buffer
|
|
420
|
+
|
|
403
421
|
To read from an existing Perl filehandle, C<$input>, and write the
|
|
404
422
|
compressed data to a buffer, C<$buffer>.
|
|
405
423
|
|
|
@@ -408,12 +426,14 @@ compressed data to a buffer, C<$buffer>.
|
|
|
408
426
|
use IO::Compress::Bzip2 qw(bzip2 $Bzip2Error) ;
|
|
409
427
|
use IO::File ;
|
|
410
428
|
|
|
411
|
-
my $input =
|
|
429
|
+
my $input = IO::File->new( "<file1.txt" )
|
|
412
430
|
or die "Cannot open 'file1.txt': $!\n" ;
|
|
413
431
|
my $buffer ;
|
|
414
432
|
bzip2 $input => \$buffer
|
|
415
433
|
or die "bzip2 failed: $Bzip2Error\n";
|
|
416
434
|
|
|
435
|
+
=head3 Compressing multiple files
|
|
436
|
+
|
|
417
437
|
To compress all files in the directory "/my/home" that match "*.txt"
|
|
418
438
|
and store the compressed data in the same directory
|
|
419
439
|
|
|
@@ -443,7 +463,7 @@ and if you want to compress each file one at a time, this will do the trick
|
|
|
443
463
|
|
|
444
464
|
The format of the constructor for C<IO::Compress::Bzip2> is shown below
|
|
445
465
|
|
|
446
|
-
my $z =
|
|
466
|
+
my $z = IO::Compress::Bzip2->new( $output [,OPTS] )
|
|
447
467
|
or die "IO::Compress::Bzip2 failed: $Bzip2Error\n";
|
|
448
468
|
|
|
449
469
|
It returns an C<IO::Compress::Bzip2> object on success and undef on failure.
|
|
@@ -488,7 +508,7 @@ return undef.
|
|
|
488
508
|
|
|
489
509
|
=head2 Constructor Options
|
|
490
510
|
|
|
491
|
-
C<OPTS> is any combination of the following options:
|
|
511
|
+
C<OPTS> is any combination of zero or more the following options:
|
|
492
512
|
|
|
493
513
|
=over 5
|
|
494
514
|
|
|
@@ -745,7 +765,7 @@ See the L</"Constructor Options"> section for more details.
|
|
|
745
765
|
|
|
746
766
|
=head1 Importing
|
|
747
767
|
|
|
748
|
-
No symbolic constants are required by
|
|
768
|
+
No symbolic constants are required by IO::Compress::Bzip2 at present.
|
|
749
769
|
|
|
750
770
|
=over 5
|
|
751
771
|
|
|
@@ -768,6 +788,12 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Apache::GZip Revisited">
|
|
|
768
788
|
|
|
769
789
|
See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP">
|
|
770
790
|
|
|
791
|
+
=head1 SUPPORT
|
|
792
|
+
|
|
793
|
+
General feedback/questions/bug reports should be sent to
|
|
794
|
+
L<https://github.com/pmqs/IO-Compress/issues> (preferred) or
|
|
795
|
+
L<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.
|
|
796
|
+
|
|
771
797
|
=head1 SEE ALSO
|
|
772
798
|
|
|
773
799
|
L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
|
|
@@ -778,7 +804,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
|
|
|
778
804
|
L<Archive::Tar|Archive::Tar>,
|
|
779
805
|
L<IO::Zlib|IO::Zlib>
|
|
780
806
|
|
|
781
|
-
The primary site for the bzip2 program is L<
|
|
807
|
+
The primary site for the bzip2 program is L<https://sourceware.org/bzip2/>.
|
|
782
808
|
|
|
783
809
|
See the module L<Compress::Bzip2|Compress::Bzip2>
|
|
784
810
|
|
|
@@ -792,8 +818,7 @@ See the Changes file.
|
|
|
792
818
|
|
|
793
819
|
=head1 COPYRIGHT AND LICENSE
|
|
794
820
|
|
|
795
|
-
Copyright (c) 2005-
|
|
821
|
+
Copyright (c) 2005-2021 Paul Marquess. All rights reserved.
|
|
796
822
|
|
|
797
823
|
This program is free software; you can redistribute it and/or
|
|
798
824
|
modify it under the same terms as Perl itself.
|
|
799
|
-
|