| 1 | package IO::Uncompress::AnyUncompress ; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 83 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 83 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 83 | ▶ | use bytes; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 83 | ▶ | use IO::Compress::Base::Common 2.225 (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 83 | ▶ | use IO::Uncompress::Base 2.225 ; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 83 | require Exporter ; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 83 | our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 83 | $VERSION = '2.225'; | |||||||||||||||||||||||||||
| 17 | 83 | $AnyUncompressError = ''; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 83 | @ISA = qw(IO::Uncompress::Base Exporter); | |||||||||||||||||||||||||||
| 20 | 83 | @EXPORT_OK = qw( $AnyUncompressError anyuncompress ) ; | |||||||||||||||||||||||||||
| 21 | 83 | ▶ | %EXPORT_TAGS = %IO::Uncompress::Base::DEFLATE_CONSTANTS if keys %IO::Uncompress::Base::DEFLATE_CONSTANTS; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | $EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | 83 | Exporter::export_ok_tags('all'); | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | # TODO - allow the user to pick a set of the three formats to allow | ||||||||||||||||||||||||||||
| 26 | # or just assume want to auto-detect any of the three formats. | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | BEGIN | ||||||||||||||||||||||||||||
| 29 | 83 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.5
| |||||||||||||||||||||||||||||
| 30 | 83 | local @INC = @INC; | |||||||||||||||||||||||||||
| 31 | 83 | ▶ | pop @INC if $INC[-1] eq '.'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | # Don't trigger any __DIE__ Hooks. | ||||||||||||||||||||||||||||
| 34 | 83 | local $SIG{__DIE__}; | |||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 83 | ▶ | eval ' use IO::Uncompress::Adapter::Inflate 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 37 | 83 | ▶ | eval ' use IO::Uncompress::Adapter::Bunzip2 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 38 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::LZO 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::Lzf 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 40 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::UnLzma 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 41 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::UnXz 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::UnZstd 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 43 | 0 | ▶ | eval ' use IO::Uncompress::Adapter::UnLzip 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 83 | ▶ | eval ' use IO::Uncompress::Bunzip2 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | eval ' use IO::Uncompress::UnLzop 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 47 | 83 | ▶ | eval ' use IO::Uncompress::Gunzip 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 48 | 83 | ▶ | eval ' use IO::Uncompress::Inflate 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 49 | 83 | ▶ | eval ' use IO::Uncompress::RawInflate 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 50 | 83 | ▶ | eval ' use IO::Uncompress::Unzip 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 51 | 0 | ▶ | eval ' use IO::Uncompress::UnLzf 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 52 | 0 | ▶ | eval ' use IO::Uncompress::UnLzma 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 53 | 0 | ▶ | eval ' use IO::Uncompress::UnXz 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 54 | 0 | ▶ | eval ' use IO::Uncompress::UnZstd 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 55 | 0 | ▶ | eval ' use IO::Uncompress::UnLzip 2.225 ;'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | sub new | ||||||||||||||||||||||||||||
| 60 | 1144 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 61 | 1144 | my $class = shift ; | |||||||||||||||||||||||||||
| 62 | 1144 | my $obj = IO::Compress::Base::Common::createSelfTiedObject($class, \$AnyUncompressError); | |||||||||||||||||||||||||||
| 63 | 1144 | $obj->_create(undef, 0, @_); | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | sub anyuncompress | ||||||||||||||||||||||||||||
| 67 | 285 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
anyuncompress: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 68 | 285 | my $obj = IO::Compress::Base::Common::createSelfTiedObject(undef, \$AnyUncompressError); | |||||||||||||||||||||||||||
| 69 | 285 | return $obj->_inf(@_) ; | |||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | sub getExtraParams | ||||||||||||||||||||||||||||
| 73 | 1349 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
getExtraParams: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 74 | 1349 | return ( 'rawinflate' => [IO::Compress::Base::Common::Parse_boolean, 0] , | |||||||||||||||||||||||||||
| 75 | 'unlzma' => [IO::Compress::Base::Common::Parse_boolean, 0] ) ; | ||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | sub ckParams | ||||||||||||||||||||||||||||
| 79 | 1404 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
ckParams: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 80 | 1404 | my $self = shift ; | |||||||||||||||||||||||||||
| 81 | 1404 | my $got = shift ; | |||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | # any always needs both crc32 and adler32 | ||||||||||||||||||||||||||||
| 84 | 1404 | $got->setValue('crc32' => 1); | |||||||||||||||||||||||||||
| 85 | 1404 | $got->setValue('adler32' => 1); | |||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | 1404 | return 1; | |||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | sub mkUncomp | ||||||||||||||||||||||||||||
| 91 | 1404 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
mkUncomp: called CC=34 SCAR=56.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 92 | 1404 | my $self = shift ; | |||||||||||||||||||||||||||
| 93 | 1404 | my $got = shift ; | |||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | 1404 | my $magic ; | |||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | # try zlib first | ||||||||||||||||||||||||||||
| 98 | 1404 | ▶ | if (defined $IO::Uncompress::RawInflate::VERSION ) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 99 | { | ||||||||||||||||||||||||||||
| 100 | 1404 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject(); | |||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 1404 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 103 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | 1404 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | 1404 | my @possible = qw( Inflate Gunzip Unzip ); | |||||||||||||||||||||||||||
| 108 | 1404 | ▶ | unshift @possible, 'RawInflate' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 109 | if $got->getValue('rawinflate'); | ||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | 1404 | $magic = $self->ckMagic( @possible ); | |||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||
| 113 | 1404 | ▶ | if ($magic) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 114 | 1139 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 115 | or return undef ; | ||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||
| 117 | 1139 | return 1; | |||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | 265 | ▶ | if (defined $IO::Uncompress::UnLzma::VERSION && $got->getValue('unlzma')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnLzma::VERSION and $got->getValue("unlzma")
MC/DC0%0/2
defined $IO::Uncompress::UnLzma::VERSION and $got->getValue("unlzma")
defined $IO::Uncompress::UnLzma::VERSION
$got->getValue("unlzma")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnLzma::VERSIONB= $got->getValue("unlzma")
| |||||||||||||||||||||||||||||
| 122 | { | ||||||||||||||||||||||||||||
| 123 | 0 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnLzma::mkUncompObject(); | |||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 126 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||
| 130 | 0 | my @possible = qw( UnLzma ); | |||||||||||||||||||||||||||
| 131 | #unshift @possible, 'RawInflate' | ||||||||||||||||||||||||||||
| 132 | # if $got->getValue('rawinflate'); | ||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if ( *$self->{Info} = $self->ckMagic( @possible )) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 135 | { | ||||||||||||||||||||||||||||
| 136 | 0 | return 1; | |||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||
| 140 | 265 | ▶ | if (defined $IO::Uncompress::UnXz::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnXz::VERSION and $magic = $self->ckMagic("UnXz")
MC/DC0%0/2
defined $IO::Uncompress::UnXz::VERSION and $magic = $self->ckMagic("UnXz")
defined $IO::Uncompress::UnXz::VERSION
$magic = $self->ckMagic("UnXz")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnXz::VERSIONB= $magic = $self->ckMagic("UnXz")
| |||||||||||||||||||||||||||||
| 141 | $magic = $self->ckMagic('UnXz')) { | ||||||||||||||||||||||||||||
| 142 | 0 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 143 | or return undef ; | ||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | 0 | my ($obj, $errstr, $errno) = | |||||||||||||||||||||||||||
| 146 | IO::Uncompress::Adapter::UnXz::mkUncompObject(); | ||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||
| 148 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 149 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||
| 151 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||
| 153 | 0 | return 1; | |||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | 265 | ▶ | if (defined $IO::Uncompress::Bunzip2::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $IO::Uncompress::Bunzip2::VERSION and $magic = $self->ckMagic("Bunzip2")
MC/DC50%1/2
defined $IO::Uncompress::Bunzip2::VERSION and $magic = $self->ckMagic("Bunzip2")
defined $IO::Uncompress::Bunzip2::VERSION
$magic = $self->ckMagic("Bunzip2")
Truth table66%2/3
A and B
A= defined $IO::Uncompress::Bunzip2::VERSIONB= $magic = $self->ckMagic("Bunzip2")
| |||||||||||||||||||||||||||||
| 157 | $magic = $self->ckMagic('Bunzip2')) { | ||||||||||||||||||||||||||||
| 158 | 250 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 159 | or return undef ; | ||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||
| 161 | 250 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Bunzip2::mkUncompObject(); | |||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | 250 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 164 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 250 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | 250 | return 1; | |||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | 15 | ▶ | if (defined $IO::Uncompress::UnLzop::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnLzop::VERSION and $magic = $self->ckMagic("UnLzop")
MC/DC0%0/2
defined $IO::Uncompress::UnLzop::VERSION and $magic = $self->ckMagic("UnLzop")
defined $IO::Uncompress::UnLzop::VERSION
$magic = $self->ckMagic("UnLzop")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnLzop::VERSIONB= $magic = $self->ckMagic("UnLzop")
| |||||||||||||||||||||||||||||
| 172 | $magic = $self->ckMagic('UnLzop')) { | ||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | 0 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 175 | or return undef ; | ||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||
| 177 | 0 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::LZO::mkUncompObject(); | |||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 180 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||
| 184 | 0 | return 1; | |||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | 15 | ▶ | if (defined $IO::Uncompress::UnLzf::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnLzf::VERSION and $magic = $self->ckMagic("UnLzf")
MC/DC0%0/2
defined $IO::Uncompress::UnLzf::VERSION and $magic = $self->ckMagic("UnLzf")
defined $IO::Uncompress::UnLzf::VERSION
$magic = $self->ckMagic("UnLzf")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnLzf::VERSIONB= $magic = $self->ckMagic("UnLzf")
| |||||||||||||||||||||||||||||
| 188 | $magic = $self->ckMagic('UnLzf')) { | ||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||
| 190 | 0 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 191 | or return undef ; | ||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | 0 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Lzf::mkUncompObject(); | |||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||
| 195 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 196 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||
| 200 | 0 | return 1; | |||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||
| 203 | 15 | ▶ | if (defined $IO::Uncompress::UnZstd::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnZstd::VERSION and $magic = $self->ckMagic("UnZstd")
MC/DC0%0/2
defined $IO::Uncompress::UnZstd::VERSION and $magic = $self->ckMagic("UnZstd")
defined $IO::Uncompress::UnZstd::VERSION
$magic = $self->ckMagic("UnZstd")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnZstd::VERSIONB= $magic = $self->ckMagic("UnZstd")
| |||||||||||||||||||||||||||||
| 204 | $magic = $self->ckMagic('UnZstd')) { | ||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | 0 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 207 | or return undef ; | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | 0 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnZstd::mkUncompObject(); | |||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 212 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||
| 216 | 0 | return 1; | |||||||||||||||||||||||||||
| 217 | } | ||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||
| 220 | 15 | ▶ | if (defined $IO::Uncompress::UnLzip::VERSION and | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $IO::Uncompress::UnLzip::VERSION and $magic = $self->ckMagic("UnLzip")
MC/DC0%0/2
defined $IO::Uncompress::UnLzip::VERSION and $magic = $self->ckMagic("UnLzip")
defined $IO::Uncompress::UnLzip::VERSION
$magic = $self->ckMagic("UnLzip")
Truth table33%1/3
A and B
A= defined $IO::Uncompress::UnLzip::VERSIONB= $magic = $self->ckMagic("UnLzip")
| |||||||||||||||||||||||||||||
| 221 | $magic = $self->ckMagic('UnLzip')) { | ||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | 0 | ▶ | *$self->{Info} = $self->readHeader($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 224 | or return undef ; | ||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | 0 | my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnLzip::mkUncompObject(*$self->{Info}{DictSize}); | |||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||
| 228 | 0 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 229 | if ! defined $obj; | ||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | 0 | *$self->{Uncomp} = $obj; | |||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | 0 | return 1; | |||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | 15 | return 0 ; | |||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||
| 241 | sub ckMagic | ||||||||||||||||||||||||||||
| 242 | 1669 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
ckMagic: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 243 | 1669 | my $self = shift; | |||||||||||||||||||||||||||
| 244 | 1669 | my @names = @_ ; | |||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | 1669 | my $keep = ref $self ; | |||||||||||||||||||||||||||
| 247 | 1669 | for my $class ( map { "IO::Uncompress::$_" } @names) | |||||||||||||||||||||||||||
| 248 | { | ||||||||||||||||||||||||||||
| 249 | 4093 | bless $self => $class; | |||||||||||||||||||||||||||
| 250 | 4093 | my $magic = $self->ckMagic(); | |||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||
| 252 | 4093 | ▶ | if ($magic) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 253 | { | ||||||||||||||||||||||||||||
| 254 | #bless $self => $class; | ||||||||||||||||||||||||||||
| 255 | 1389 | return $magic ; | |||||||||||||||||||||||||||
| 256 | } | ||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||
| 258 | 2704 | $self->pushBack(*$self->{HeaderPending}) ; | |||||||||||||||||||||||||||
| 259 | 2704 | *$self->{HeaderPending} = '' ; | |||||||||||||||||||||||||||
| 260 | } | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | 280 | bless $self => $keep; | |||||||||||||||||||||||||||
| 263 | 280 | return undef; | |||||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||
| 266 | 83 | 1 ; | |||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||
| 268 | __END__ | ||||||||||||||||||||||||||||