line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Compress::Xz ; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
49026
|
use strict ; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
345
|
|
4
|
13
|
|
|
13
|
|
48
|
use warnings; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
297
|
|
5
|
13
|
|
|
13
|
|
4842
|
use bytes; |
|
13
|
|
|
|
|
79
|
|
|
13
|
|
|
|
|
61
|
|
6
|
|
|
|
|
|
|
require Exporter ; |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
6826
|
use IO::Compress::Base 2.074 ; |
|
13
|
|
|
|
|
205030
|
|
|
13
|
|
|
|
|
660
|
|
9
|
13
|
|
|
13
|
|
100
|
use IO::Compress::Base::Common 2.074 qw(createSelfTiedObject); |
|
13
|
|
|
|
|
160
|
|
|
13
|
|
|
|
|
850
|
|
10
|
13
|
|
|
13
|
|
6776
|
use IO::Compress::Adapter::Xz 2.074 ; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Compress::Raw::Lzma 2.074 ; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $XzError); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$VERSION = '2.074'; |
17
|
|
|
|
|
|
|
$XzError = ''; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@ISA = qw(IO::Compress::Base Exporter); |
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__ |