| 1 | package IO::Compress::Zstd ; | ||||||||||
| 2 | |||||||||||
| 3 | 11 | ▶ | use strict ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 11 | require Exporter ; | |||||||||
| 6 | 11 | ▶ | use bytes; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 11 | ▶ | use IO::Compress::Base 2.224 ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 11 | ▶ | use IO::Compress::Base::Common 2.224 qw(createSelfTiedObject); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 11 | ▶ | use IO::Compress::Adapter::Zstd 2.224 ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 11 | ▶ | use Compress::Stream::Zstd qw(ZSTD_MAX_CLEVEL); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 11 | our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZstdError); | |||||||||
| 16 | |||||||||||
| 17 | 11 | $VERSION = '2.224'; | |||||||||
| 18 | 11 | $ZstdError = ''; | |||||||||
| 19 | |||||||||||
| 20 | 11 | @ISA = qw( IO::Compress::Base Exporter ); | |||||||||
| 21 | 11 | @EXPORT_OK = qw( $ZstdError zstd ZSTD_MAX_CLEVEL ) ; | |||||||||
| 22 | 11 | %EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ; | |||||||||
| 23 | 11 | ▶ | $EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 11 | Exporter::export_ok_tags('all'); | |||||||||
| 25 | |||||||||||
| 26 | sub new | ||||||||||
| 27 | 118 | ▶ | { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | 118 | my $class = shift ; | |||||||||
| 29 | |||||||||||
| 30 | 118 | my $obj = createSelfTiedObject($class, \$ZstdError); | |||||||||
| 31 | 118 | return $obj->_create(undef, @_); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | sub zstd | ||||||||||
| 35 | 128 | ▶ | { | ||||||||
|
Subroutine
zstd: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 36 | 128 | my $obj = createSelfTiedObject(undef, \$ZstdError); | |||||||||
| 37 | 128 | return $obj->_def(@_); | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | sub mkHeader | ||||||||||
| 41 | 216 | ▶ | { | ||||||||
|
Subroutine
mkHeader: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 42 | 216 | my $self = shift ; | |||||||||
| 43 | 216 | my $param = shift ; | |||||||||
| 44 | |||||||||||
| 45 | 216 | return ''; | |||||||||
| 46 | |||||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | sub ckParams | ||||||||||
| 50 | 218 | ▶ | { | ||||||||
|
Subroutine
ckParams: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 51 | 218 | my $self = shift ; | |||||||||
| 52 | 218 | my $got = shift; | |||||||||
| 53 | |||||||||||
| 54 | 218 | return 1 ; | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | |||||||||||
| 58 | sub mkComp | ||||||||||
| 59 | 217 | ▶ | { | ||||||||
|
Subroutine
mkComp: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 60 | 217 | my $self = shift ; | |||||||||
| 61 | 217 | my $got = shift ; | |||||||||
| 62 | |||||||||||
| 63 | 217 | my ($obj, $errstr, $errno) = IO::Compress::Adapter::Zstd::mkCompObject( | |||||||||
| 64 | $got->getValue('level'), | ||||||||||
| 65 | ); | ||||||||||
| 66 | |||||||||||
| 67 | 217 | ▶ | return $self->saveErrorString(undef, $errstr, $errno) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 68 | if ! defined $obj; | ||||||||||
| 69 | |||||||||||
| 70 | 217 | return $obj; | |||||||||
| 71 | |||||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | sub mkTrailer | ||||||||||
| 76 | 216 | ▶ | { | ||||||||
|
Subroutine
mkTrailer: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 77 | 216 | my $self = shift ; | |||||||||
| 78 | 216 | return ""; | |||||||||
| 79 | } | ||||||||||
| 80 | |||||||||||
| 81 | sub mkFinalTrailer | ||||||||||
| 82 | 216 | ▶ | { | ||||||||
|
Subroutine
mkFinalTrailer: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 83 | 216 | my $self = shift ; | |||||||||
| 84 | |||||||||||
| 85 | 216 | return ''; | |||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | #sub newHeader | ||||||||||
| 89 | #{ | ||||||||||
| 90 | # my $self = shift ; | ||||||||||
| 91 | # return ''; | ||||||||||
| 92 | #} | ||||||||||
| 93 | |||||||||||
| 94 | 11 | our %PARAMS = ( | |||||||||
| 95 | 'level' => [IO::Compress::Base::Common::Parse_unsigned, 3], | ||||||||||
| 96 | ); | ||||||||||
| 97 | |||||||||||
| 98 | sub getExtraParams | ||||||||||
| 99 | 218 | ▶ | { | ||||||||
|
Subroutine
getExtraParams: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 100 | 218 | return %PARAMS ; | |||||||||
| 101 | } | ||||||||||
| 102 | |||||||||||
| 103 | sub getInverseClass | ||||||||||
| 104 | 0 | ▶ | { | ||||||||
|
Subroutine
getInverseClass: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 105 | 0 | return ('IO::Uncompress::UnZstd'); | |||||||||
| 106 | } | ||||||||||
| 107 | |||||||||||
| 108 | 11 | 1; | |||||||||
| 109 | |||||||||||
| 110 | __END__ | ||||||||||