line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Compress::Xz ; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
47257
|
use strict ; |
|
13
|
|
|
|
|
19
|
|
|
13
|
|
|
|
|
343
|
|
4
|
13
|
|
|
13
|
|
48
|
use warnings; |
|
13
|
|
|
|
|
15
|
|
|
13
|
|
|
|
|
262
|
|
5
|
13
|
|
|
13
|
|
4477
|
use bytes; |
|
13
|
|
|
|
|
78
|
|
|
13
|
|
|
|
|
54
|
|
6
|
|
|
|
|
|
|
require Exporter ; |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
6455
|
use IO::Compress::Base 2.072 ; |
|
13
|
|
|
|
|
189588
|
|
|
13
|
|
|
|
|
582
|
|
9
|
13
|
|
|
13
|
|
84
|
use IO::Compress::Base::Common 2.072 qw(createSelfTiedObject); |
|
13
|
|
|
|
|
138
|
|
|
13
|
|
|
|
|
683
|
|
10
|
13
|
|
|
13
|
|
5881
|
use IO::Compress::Adapter::Xz 2.072 ; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Compress::Raw::Lzma 2.072 ; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $XzError); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$VERSION = '2.072'; |
17
|
|
|
|
|
|
|
$XzError = ''; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@ISA = qw(Exporter IO::Compress::Base); |
20
|
|
|
|
|
|
|
@EXPORT_OK = qw( $XzError xz ) ; |
21
|
|
|
|
|
|
|
%EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
push @{ $EXPORT_TAGS{constants} }, @Compress::Raw::Lzma::EXPORT; |
24
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = $EXPORT_TAGS{constants} ; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; |
27
|
|
|
|
|
|
|
Exporter::export_ok_tags('all'); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new |
31
|
|
|
|
|
|
|
{ |
32
|
|
|
|
|
|
|
my $class = shift ; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $obj = createSelfTiedObject($class, \$XzError); |
35
|
|
|
|
|
|
|
return $obj->_create(undef, @_); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub xz |
39
|
|
|
|
|
|
|
{ |
40
|
|
|
|
|
|
|
my $obj = createSelfTiedObject(undef, \$XzError); |
41
|
|
|
|
|
|
|
$obj->_def(@_); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub mkHeader |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
my $self = shift ; |
48
|
|
|
|
|
|
|
return ''; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
our %PARAMS = ( |
52
|
|
|
|
|
|
|
'preset' => [IO::Compress::Base::Common::Parse_unsigned, LZMA_PRESET_DEFAULT], |
53
|
|
|
|
|
|
|
'extreme'=> [IO::Compress::Base::Common::Parse_boolean, 0], |
54
|
|
|
|
|
|
|
'check' => [IO::Compress::Base::Common::Parse_unsigned, LZMA_CHECK_CRC32], |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub getExtraParams |
58
|
|
|
|
|
|
|
{ |
59
|
|
|
|
|
|
|
return %PARAMS ; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub ckParams |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
my $self = shift ; |
67
|
|
|
|
|
|
|
my $got = shift; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# TODO - validate the parameters |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
return 1 ; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub mkComp |
76
|
|
|
|
|
|
|
{ |
77
|
|
|
|
|
|
|
my $self = shift ; |
78
|
|
|
|
|
|
|
my $got = shift ; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
my ($obj, $errstr, $errno) |
81
|
|
|
|
|
|
|
= IO::Compress::Adapter::Xz::mkCompObject($got->getValue('preset'), |
82
|
|
|
|
|
|
|
$got->getValue('extreme'), |
83
|
|
|
|
|
|
|
$got->getValue('check') |
84
|
|
|
|
|
|
|
); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
return $self->saveErrorString(undef, $errstr, $errno) |
87
|
|
|
|
|
|
|
if ! defined $obj; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
return $obj; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub mkTrailer |
94
|
|
|
|
|
|
|
{ |
95
|
|
|
|
|
|
|
my $self = shift ; |
96
|
|
|
|
|
|
|
return ''; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub mkFinalTrailer |
100
|
|
|
|
|
|
|
{ |
101
|
|
|
|
|
|
|
return ''; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
#sub newHeader |
105
|
|
|
|
|
|
|
#{ |
106
|
|
|
|
|
|
|
# my $self = shift ; |
107
|
|
|
|
|
|
|
# return ''; |
108
|
|
|
|
|
|
|
#} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub getInverseClass |
111
|
|
|
|
|
|
|
{ |
112
|
|
|
|
|
|
|
return ('IO::Uncompress::UnXz'); |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub getFileInfo |
116
|
|
|
|
|
|
|
{ |
117
|
|
|
|
|
|
|
my $self = shift ; |
118
|
|
|
|
|
|
|
my $params = shift; |
119
|
|
|
|
|
|
|
my $file = shift ; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
__END__ |