line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Compress::Zstd ; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
37990
|
use strict ; |
|
11
|
|
|
|
|
75
|
|
|
11
|
|
|
|
|
321
|
|
4
|
11
|
|
|
11
|
|
60
|
use warnings; |
|
11
|
|
|
|
|
33
|
|
|
11
|
|
|
|
|
390
|
|
5
|
|
|
|
|
|
|
require Exporter ; |
6
|
11
|
|
|
11
|
|
5158
|
use bytes; |
|
11
|
|
|
|
|
128
|
|
|
11
|
|
|
|
|
70
|
|
7
|
|
|
|
|
|
|
|
8
|
11
|
|
|
11
|
|
6029
|
use IO::Compress::Base 2.205 ; |
|
11
|
|
|
|
|
246607
|
|
|
11
|
|
|
|
|
675
|
|
9
|
|
|
|
|
|
|
|
10
|
11
|
|
|
11
|
|
155
|
use IO::Compress::Base::Common 2.205 qw(createSelfTiedObject); |
|
11
|
|
|
|
|
160
|
|
|
11
|
|
|
|
|
812
|
|
11
|
11
|
|
|
11
|
|
5993
|
use IO::Compress::Adapter::Zstd 2.205 ; |
|
11
|
|
|
|
|
281
|
|
|
11
|
|
|
|
|
355
|
|
12
|
11
|
|
|
11
|
|
78
|
use Compress::Stream::Zstd qw(ZSTD_MAX_CLEVEL); |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
5489
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZstdError); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$VERSION = '2.205'; |
18
|
|
|
|
|
|
|
$ZstdError = ''; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
@ISA = qw( IO::Compress::Base Exporter ); |
21
|
|
|
|
|
|
|
@EXPORT_OK = qw( $ZstdError zstd ZSTD_MAX_CLEVEL ) ; |
22
|
|
|
|
|
|
|
%EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ; |
23
|
|
|
|
|
|
|
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; |
24
|
|
|
|
|
|
|
Exporter::export_ok_tags('all'); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new |
27
|
|
|
|
|
|
|
{ |
28
|
118
|
|
|
118
|
1
|
1813441
|
my $class = shift ; |
29
|
|
|
|
|
|
|
|
30
|
118
|
|
|
|
|
503
|
my $obj = createSelfTiedObject($class, \$ZstdError); |
31
|
118
|
|
|
|
|
5243
|
return $obj->_create(undef, @_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub zstd |
35
|
|
|
|
|
|
|
{ |
36
|
128
|
|
|
128
|
1
|
228726
|
my $obj = createSelfTiedObject(undef, \$ZstdError); |
37
|
128
|
|
|
|
|
5723
|
return $obj->_def(@_); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub mkHeader |
41
|
|
|
|
|
|
|
{ |
42
|
216
|
|
|
216
|
0
|
14052
|
my $self = shift ; |
43
|
216
|
|
|
|
|
342
|
my $param = shift ; |
44
|
|
|
|
|
|
|
|
45
|
216
|
|
|
|
|
573
|
return ''; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub ckParams |
50
|
|
|
|
|
|
|
{ |
51
|
218
|
|
|
218
|
0
|
45093
|
my $self = shift ; |
52
|
218
|
|
|
|
|
370
|
my $got = shift; |
53
|
|
|
|
|
|
|
|
54
|
218
|
|
|
|
|
418
|
return 1 ; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub mkComp |
59
|
|
|
|
|
|
|
{ |
60
|
217
|
|
|
217
|
0
|
5285
|
my $self = shift ; |
61
|
217
|
|
|
|
|
337
|
my $got = shift ; |
62
|
|
|
|
|
|
|
|
63
|
217
|
|
|
|
|
471
|
my ($obj, $errstr, $errno) = IO::Compress::Adapter::Zstd::mkCompObject( |
64
|
|
|
|
|
|
|
$got->getValue('level'), |
65
|
|
|
|
|
|
|
); |
66
|
|
|
|
|
|
|
|
67
|
217
|
50
|
|
|
|
645
|
return $self->saveErrorString(undef, $errstr, $errno) |
68
|
|
|
|
|
|
|
if ! defined $obj; |
69
|
|
|
|
|
|
|
|
70
|
217
|
|
|
|
|
745
|
return $obj; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub mkTrailer |
76
|
|
|
|
|
|
|
{ |
77
|
216
|
|
|
216
|
0
|
3459
|
my $self = shift ; |
78
|
216
|
|
|
|
|
511
|
return ""; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub mkFinalTrailer |
82
|
|
|
|
|
|
|
{ |
83
|
216
|
|
|
216
|
0
|
7323
|
my $self = shift ; |
84
|
|
|
|
|
|
|
|
85
|
216
|
|
|
|
|
544
|
return ''; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
#sub newHeader |
89
|
|
|
|
|
|
|
#{ |
90
|
|
|
|
|
|
|
# my $self = shift ; |
91
|
|
|
|
|
|
|
# return ''; |
92
|
|
|
|
|
|
|
#} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
our %PARAMS = ( |
95
|
|
|
|
|
|
|
'level' => [IO::Compress::Base::Common::Parse_unsigned, 3], |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub getExtraParams |
99
|
|
|
|
|
|
|
{ |
100
|
218
|
|
|
218
|
0
|
22281
|
return %PARAMS ; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub getInverseClass |
104
|
|
|
|
|
|
|
{ |
105
|
0
|
|
|
0
|
0
|
|
return ('IO::Uncompress::UnZstd'); |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
1; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
__END__ |