| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package IO::Compress::Lzf ; |
|
2
|
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
31544
|
use strict ; |
|
|
10
|
|
|
|
|
63
|
|
|
|
10
|
|
|
|
|
291
|
|
|
4
|
10
|
|
|
10
|
|
58
|
use warnings; |
|
|
10
|
|
|
|
|
25
|
|
|
|
10
|
|
|
|
|
391
|
|
|
5
|
|
|
|
|
|
|
require Exporter ; |
|
6
|
10
|
|
|
10
|
|
4834
|
use bytes; |
|
|
10
|
|
|
|
|
117
|
|
|
|
10
|
|
|
|
|
46
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
5252
|
use IO::Compress::Base 2.206 ; |
|
|
10
|
|
|
|
|
222914
|
|
|
|
10
|
|
|
|
|
534
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
91
|
use IO::Compress::Base::Common 2.206 qw(createSelfTiedObject); |
|
|
10
|
|
|
|
|
131
|
|
|
|
10
|
|
|
|
|
614
|
|
|
11
|
10
|
|
|
10
|
|
4687
|
use IO::Compress::Adapter::Lzf 2.206 ; |
|
|
10
|
|
|
|
|
221
|
|
|
|
10
|
|
|
|
|
4738
|
|
|
12
|
|
|
|
|
|
|
#use Compress::Lzf ; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $LzfError); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$VERSION = '2.206'; |
|
17
|
|
|
|
|
|
|
$LzfError = ''; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@ISA = qw( IO::Compress::Base Exporter ); |
|
20
|
|
|
|
|
|
|
@EXPORT_OK = qw( $LzfError lzf ) ; |
|
21
|
|
|
|
|
|
|
%EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ; |
|
22
|
|
|
|
|
|
|
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; |
|
23
|
|
|
|
|
|
|
Exporter::export_ok_tags('all'); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new |
|
26
|
|
|
|
|
|
|
{ |
|
27
|
120
|
|
|
120
|
1
|
1139902
|
my $class = shift ; |
|
28
|
|
|
|
|
|
|
|
|
29
|
120
|
|
|
|
|
420
|
my $obj = createSelfTiedObject($class, \$LzfError); |
|
30
|
120
|
|
|
|
|
4818
|
return $obj->_create(undef, @_); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub lzf |
|
34
|
|
|
|
|
|
|
{ |
|
35
|
130
|
|
|
130
|
1
|
220072
|
my $obj = createSelfTiedObject(undef, \$LzfError); |
|
36
|
130
|
|
|
|
|
5786
|
return $obj->_def(@_); |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub mkHeader |
|
40
|
|
|
|
|
|
|
{ |
|
41
|
220
|
|
|
220
|
0
|
13381
|
my $self = shift ; |
|
42
|
220
|
|
|
|
|
324
|
my $param = shift ; |
|
43
|
|
|
|
|
|
|
|
|
44
|
220
|
|
|
|
|
541
|
return ''; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub ckParams |
|
49
|
|
|
|
|
|
|
{ |
|
50
|
222
|
|
|
222
|
0
|
43942
|
my $self = shift ; |
|
51
|
222
|
|
|
|
|
357
|
my $got = shift; |
|
52
|
|
|
|
|
|
|
|
|
53
|
222
|
|
|
|
|
452
|
return 1 ; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub mkComp |
|
58
|
|
|
|
|
|
|
{ |
|
59
|
221
|
|
|
221
|
0
|
4777
|
my $self = shift ; |
|
60
|
221
|
|
|
|
|
305
|
my $got = shift ; |
|
61
|
|
|
|
|
|
|
|
|
62
|
221
|
|
|
|
|
463
|
my ($obj, $errstr, $errno) = IO::Compress::Adapter::Lzf::mkCompObject( |
|
63
|
|
|
|
|
|
|
$got->getValue('blocksize'), |
|
64
|
|
|
|
|
|
|
); |
|
65
|
|
|
|
|
|
|
|
|
66
|
221
|
50
|
|
|
|
632
|
return $self->saveErrorString(undef, $errstr, $errno) |
|
67
|
|
|
|
|
|
|
if ! defined $obj; |
|
68
|
|
|
|
|
|
|
|
|
69
|
221
|
|
|
|
|
643
|
return $obj; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub mkTrailer |
|
75
|
|
|
|
|
|
|
{ |
|
76
|
220
|
|
|
220
|
0
|
3394
|
my $self = shift ; |
|
77
|
220
|
|
|
|
|
485
|
return ""; |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub mkFinalTrailer |
|
81
|
|
|
|
|
|
|
{ |
|
82
|
220
|
|
|
220
|
0
|
5830
|
my $self = shift ; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
# If nothing written at all, need to create an zero-length block |
|
85
|
|
|
|
|
|
|
return 'ZV'. pack("Cn", 0, 0) |
|
86
|
220
|
100
|
|
|
|
572
|
if *$self->{Compress}->uncompressedBytes() == 0 ; |
|
87
|
|
|
|
|
|
|
|
|
88
|
152
|
|
|
|
|
372
|
return ''; |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
#sub newHeader |
|
92
|
|
|
|
|
|
|
#{ |
|
93
|
|
|
|
|
|
|
# my $self = shift ; |
|
94
|
|
|
|
|
|
|
# return ''; |
|
95
|
|
|
|
|
|
|
#} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
our %PARAMS = ( |
|
98
|
|
|
|
|
|
|
'blocksize' => [IO::Compress::Base::Common::Parse_unsigned, (64* 1024) - 1], |
|
99
|
|
|
|
|
|
|
); |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub getExtraParams |
|
102
|
|
|
|
|
|
|
{ |
|
103
|
222
|
|
|
222
|
0
|
22278
|
return %PARAMS ; |
|
104
|
|
|
|
|
|
|
} |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub getInverseClass |
|
107
|
|
|
|
|
|
|
{ |
|
108
|
0
|
|
|
0
|
0
|
|
return ('IO::Uncompress::UnLzf'); |
|
109
|
|
|
|
|
|
|
} |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
1; |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
__END__ |