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