line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Uncompress::Adapter::UnZstd; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
276472
|
use strict; |
|
12
|
|
|
|
|
58
|
|
|
12
|
|
|
|
|
381
|
|
4
|
12
|
|
|
12
|
|
62
|
use warnings; |
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
344
|
|
5
|
12
|
|
|
12
|
|
76
|
use bytes; |
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
85
|
|
6
|
|
|
|
|
|
|
|
7
|
12
|
|
|
12
|
|
448
|
use IO::Compress::Base::Common 2.206 qw(:Status); |
|
12
|
|
|
|
|
208
|
|
|
12
|
|
|
|
|
1352
|
|
8
|
12
|
|
|
12
|
|
1856
|
use Compress::Stream::Zstd ; |
|
12
|
|
|
|
|
3316
|
|
|
12
|
|
|
|
|
866
|
|
9
|
12
|
|
|
12
|
|
5511
|
use Compress::Stream::Zstd::Decompressor qw(ZSTD_DSTREAM_IN_SIZE); |
|
12
|
|
|
|
|
2553
|
|
|
12
|
|
|
|
|
4144
|
|
10
|
|
|
|
|
|
|
our ($VERSION, @ISA); |
11
|
|
|
|
|
|
|
$VERSION = '2.206'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub mkUncompObject |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
|
17
|
920
|
|
|
920
|
0
|
52210
|
my $decompressor = Compress::Stream::Zstd::Decompressor->new; |
18
|
|
|
|
|
|
|
|
19
|
920
|
|
|
|
|
6009
|
return bless { |
20
|
|
|
|
|
|
|
'Inf' => $decompressor, |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
'CompBytes' => 0, |
23
|
|
|
|
|
|
|
'UnCompBytes' => 0, |
24
|
|
|
|
|
|
|
'Error' => '', |
25
|
|
|
|
|
|
|
'ErrorNo' => 0, |
26
|
|
|
|
|
|
|
'ConsumesInput' => 0, |
27
|
|
|
|
|
|
|
} ; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub uncompr |
31
|
|
|
|
|
|
|
{ |
32
|
2618
|
|
|
2618
|
0
|
388576
|
my $self = shift ; |
33
|
2618
|
|
|
|
|
3924
|
my $from = shift ; |
34
|
2618
|
|
|
|
|
3607
|
my $to = shift ; |
35
|
|
|
|
|
|
|
# my $eof = shift ; |
36
|
|
|
|
|
|
|
|
37
|
2618
|
|
|
|
|
4258
|
my $inf = $self->{Inf}; |
38
|
|
|
|
|
|
|
|
39
|
2618
|
|
|
|
|
4416
|
eval { $$to .= $inf->decompress($$from); } ; |
|
2618
|
|
|
|
|
16166
|
|
40
|
|
|
|
|
|
|
|
41
|
2618
|
100
|
66
|
|
|
13951
|
if ($@ || $inf->isError()) |
42
|
|
|
|
|
|
|
{ |
43
|
22
|
|
|
|
|
87
|
$self->{Error} = $inf->getErrorName(); |
44
|
22
|
|
|
|
|
73
|
$self->{ErrorNo} = $inf->status() ; |
45
|
22
|
|
|
|
|
60
|
return STATUS_ERROR ; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
2596
|
|
|
|
|
4849
|
$self->{Error} = "" ; |
49
|
2596
|
|
|
|
|
3542
|
$self->{ErrorNo} = 0; |
50
|
|
|
|
|
|
|
|
51
|
2596
|
100
|
|
|
|
6778
|
return STATUS_ENDSTREAM if $inf->isEndFrame() ; |
52
|
|
|
|
|
|
|
|
53
|
2236
|
|
|
|
|
4765
|
return STATUS_OK ; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub reset |
57
|
|
|
|
|
|
|
{ |
58
|
1
|
|
|
1
|
0
|
356
|
return STATUS_OK ; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
#sub count |
62
|
|
|
|
|
|
|
#{ |
63
|
|
|
|
|
|
|
# my $self = shift ; |
64
|
|
|
|
|
|
|
# $self->{UnCompBytes}; |
65
|
|
|
|
|
|
|
#} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub compressedBytes |
68
|
|
|
|
|
|
|
{ |
69
|
0
|
|
|
0
|
0
|
|
my $self = shift ; |
70
|
0
|
|
|
|
|
|
$self->{CompBytes}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub uncompressedBytes |
74
|
|
|
|
|
|
|
{ |
75
|
0
|
|
|
0
|
0
|
|
my $self = shift ; |
76
|
0
|
|
|
|
|
|
$self->{UnCompBytes}; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub crc32 |
80
|
|
|
|
|
|
|
{ |
81
|
0
|
|
|
0
|
0
|
|
my $self = shift ; |
82
|
|
|
|
|
|
|
#$self->{Inf}->crc32(); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub adler32 |
86
|
|
|
|
|
|
|
{ |
87
|
0
|
|
|
0
|
0
|
|
my $self = shift ; |
88
|
|
|
|
|
|
|
#$self->{Inf}->adler32(); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub sync |
92
|
|
|
|
|
|
|
{ |
93
|
0
|
|
|
0
|
0
|
|
my $self = shift ; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
__END__ |