| Filename | /usr/libdata/perl5/amd64-openbsd/IO/Uncompress/Adapter/Inflate.pm |
| Statements | Executed 2172 statements in 27.0ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 182 | 1 | 1 | 6.00ms | 21.7ms | IO::Uncompress::Adapter::Inflate::uncompr |
| 40 | 1 | 1 | 5.39ms | 73.9ms | IO::Uncompress::Adapter::Inflate::mkUncompObject |
| 40 | 1 | 1 | 388µs | 536µs | IO::Uncompress::Adapter::Inflate::reset |
| 1 | 1 | 1 | 19µs | 23µs | IO::Uncompress::Adapter::Inflate::BEGIN@3 |
| 1 | 1 | 1 | 18µs | 210µs | IO::Uncompress::Adapter::Inflate::BEGIN@8 |
| 1 | 1 | 1 | 16µs | 187µs | IO::Uncompress::Adapter::Inflate::BEGIN@7 |
| 1 | 1 | 1 | 11µs | 22µs | IO::Uncompress::Adapter::Inflate::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::adler32 |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::compressedBytes |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::crc32 |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::createDeflateStream |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::getEndOffset |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::getLastBlockOffset |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::resetLastBlockByte |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::sync |
| 0 | 0 | 0 | 0s | 0s | IO::Uncompress::Adapter::Inflate::uncompressedBytes |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package IO::Uncompress::Adapter::Inflate; | ||||
| 2 | |||||
| 3 | 2 | 38µs | 2 | 26µs | # spent 23µs (19+4) within IO::Uncompress::Adapter::Inflate::BEGIN@3 which was called:
# once (19µs+4µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 3 # spent 23µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@3
# spent 4µs making 1 call to strict::import |
| 4 | 2 | 34µs | 2 | 33µs | # spent 22µs (11+11) within IO::Uncompress::Adapter::Inflate::BEGIN@4 which was called:
# once (11µs+11µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 4 # spent 22µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@4
# spent 11µs making 1 call to warnings::import |
| 5 | #use bytes; | ||||
| 6 | |||||
| 7 | 3 | 55µs | 3 | 358µs | # spent 187µs (16+171) within IO::Uncompress::Adapter::Inflate::BEGIN@7 which was called:
# once (16µs+171µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 7 # spent 187µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@7
# spent 162µs making 1 call to Exporter::import
# spent 9µs making 1 call to UNIVERSAL::VERSION |
| 8 | 3 | 565µs | 3 | 402µs | # spent 210µs (18+192) within IO::Uncompress::Adapter::Inflate::BEGIN@8 which was called:
# once (18µs+192µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 8 # spent 210µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@8
# spent 184µs making 1 call to Exporter::import
# spent 8µs making 1 call to UNIVERSAL::VERSION |
| 9 | |||||
| 10 | our ($VERSION); | ||||
| 11 | 1 | 900ns | $VERSION = '2.069_001'; | ||
| 12 | |||||
| - - | |||||
| 15 | sub mkUncompObject | ||||
| 16 | # spent 73.9ms (5.39+68.5) within IO::Uncompress::Adapter::Inflate::mkUncompObject which was called 40 times, avg 1.85ms/call:
# 40 times (5.39ms+68.5ms) by IO::Uncompress::RawInflate::mkUncomp at line 76 of IO/Uncompress/RawInflate.pm, avg 1.85ms/call | ||||
| 17 | 40 | 473µs | my $crc32 = shift || 1; | ||
| 18 | 40 | 64µs | my $adler32 = shift || 1; | ||
| 19 | 40 | 56µs | my $scan = shift || 0; | ||
| 20 | |||||
| 21 | 40 | 50µs | my $inflate ; | ||
| 22 | my $status ; | ||||
| 23 | |||||
| 24 | 40 | 96µs | if ($scan) | ||
| 25 | { | ||||
| 26 | ($inflate, $status) = new Compress::Raw::Zlib::InflateScan | ||||
| 27 | #LimitOutput => 1, | ||||
| 28 | CRC32 => $crc32, | ||||
| 29 | ADLER32 => $adler32, | ||||
| 30 | WindowBits => - MAX_WBITS ; | ||||
| 31 | } | ||||
| 32 | else | ||||
| 33 | { | ||||
| 34 | 40 | 4.39ms | 80 | 68.2ms | ($inflate, $status) = new Compress::Raw::Zlib::Inflate # spent 66.5ms making 40 calls to Compress::Raw::Zlib::Inflate::new, avg 1.66ms/call
# spent 1.70ms making 40 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 42µs/call |
| 35 | AppendOutput => 1, | ||||
| 36 | LimitOutput => 1, | ||||
| 37 | CRC32 => $crc32, | ||||
| 38 | ADLER32 => $adler32, | ||||
| 39 | WindowBits => - MAX_WBITS ; | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | 40 | 318µs | 40 | 259µs | return (undef, "Could not create Inflation object: $status", $status) # spent 228µs making 39 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 6µs/call
# spent 31µs making 1 call to Compress::Raw::Zlib::AUTOLOAD |
| 43 | if $status != Z_OK ; | ||||
| 44 | |||||
| 45 | 40 | 1.33ms | return bless {'Inf' => $inflate, | ||
| 46 | 'CompSize' => 0, | ||||
| 47 | 'UnCompSize' => 0, | ||||
| 48 | 'Error' => '', | ||||
| 49 | 'ConsumesInput' => 1, | ||||
| 50 | } ; | ||||
| 51 | |||||
| 52 | } | ||||
| 53 | |||||
| 54 | sub uncompr | ||||
| 55 | # spent 21.7ms (6.00+15.7) within IO::Uncompress::Adapter::Inflate::uncompr which was called 182 times, avg 119µs/call:
# 182 times (6.00ms+15.7ms) by IO::Uncompress::Base::_raw_read at line 913 of IO/Uncompress/Base.pm, avg 119µs/call | ||||
| 56 | 182 | 143µs | my $self = shift ; | ||
| 57 | 182 | 134µs | my $from = shift ; | ||
| 58 | 182 | 130µs | my $to = shift ; | ||
| 59 | 182 | 166µs | my $eof = shift ; | ||
| 60 | |||||
| 61 | 182 | 197µs | my $inf = $self->{Inf}; | ||
| 62 | |||||
| 63 | 182 | 14.3ms | 182 | 13.2ms | my $status = $inf->inflate($from, $to, $eof); # spent 13.2ms making 182 calls to Compress::Raw::Zlib::inflateStream::inflate, avg 72µs/call |
| 64 | 182 | 243µs | $self->{ErrorNo} = $status; | ||
| 65 | |||||
| 66 | 182 | 2.23ms | 505 | 1.95ms | if ($status != Z_OK && $status != Z_STREAM_END && $status != Z_BUF_ERROR) # spent 1.90ms making 503 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 4µs/call
# spent 54µs making 2 calls to Compress::Raw::Zlib::AUTOLOAD, avg 27µs/call |
| 67 | { | ||||
| 68 | $self->{Error} = "Inflation Error: $status"; | ||||
| 69 | return STATUS_ERROR; | ||||
| 70 | } | ||||
| 71 | |||||
| 72 | 182 | 1.03ms | 182 | 414µs | return STATUS_OK if $status == Z_BUF_ERROR ; # ??? # spent 414µs making 182 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call |
| 73 | 41 | 141µs | 41 | 98µs | return STATUS_OK if $status == Z_OK ; # spent 98µs making 41 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call |
| 74 | 41 | 267µs | 41 | 89µs | return STATUS_ENDSTREAM if $status == Z_STREAM_END ; # spent 89µs making 41 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call |
| 75 | return STATUS_ERROR ; | ||||
| 76 | } | ||||
| 77 | |||||
| 78 | sub reset | ||||
| 79 | # spent 536µs (388+147) within IO::Uncompress::Adapter::Inflate::reset which was called 40 times, avg 13µs/call:
# 40 times (388µs+147µs) by IO::Uncompress::Base::reset at line 987 of IO/Uncompress/Base.pm, avg 13µs/call | ||||
| 80 | 40 | 41µs | my $self = shift ; | ||
| 81 | 40 | 380µs | 40 | 147µs | $self->{Inf}->inflateReset(); # spent 147µs making 40 calls to Compress::Raw::Zlib::inflateStream::inflateReset, avg 4µs/call |
| 82 | |||||
| 83 | 40 | 180µs | return STATUS_OK ; | ||
| 84 | } | ||||
| 85 | |||||
| 86 | #sub count | ||||
| 87 | #{ | ||||
| 88 | # my $self = shift ; | ||||
| 89 | # $self->{Inf}->inflateCount(); | ||||
| 90 | #} | ||||
| 91 | |||||
| 92 | sub crc32 | ||||
| 93 | { | ||||
| 94 | my $self = shift ; | ||||
| 95 | $self->{Inf}->crc32(); | ||||
| 96 | } | ||||
| 97 | |||||
| 98 | sub compressedBytes | ||||
| 99 | { | ||||
| 100 | my $self = shift ; | ||||
| 101 | $self->{Inf}->compressedBytes(); | ||||
| 102 | } | ||||
| 103 | |||||
| 104 | sub uncompressedBytes | ||||
| 105 | { | ||||
| 106 | my $self = shift ; | ||||
| 107 | $self->{Inf}->uncompressedBytes(); | ||||
| 108 | } | ||||
| 109 | |||||
| 110 | sub adler32 | ||||
| 111 | { | ||||
| 112 | my $self = shift ; | ||||
| 113 | $self->{Inf}->adler32(); | ||||
| 114 | } | ||||
| 115 | |||||
| 116 | sub sync | ||||
| 117 | { | ||||
| 118 | my $self = shift ; | ||||
| 119 | ( $self->{Inf}->inflateSync(@_) == Z_OK) | ||||
| 120 | ? STATUS_OK | ||||
| 121 | : STATUS_ERROR ; | ||||
| 122 | } | ||||
| 123 | |||||
| 124 | |||||
| 125 | sub getLastBlockOffset | ||||
| 126 | { | ||||
| 127 | my $self = shift ; | ||||
| 128 | $self->{Inf}->getLastBlockOffset(); | ||||
| 129 | } | ||||
| 130 | |||||
| 131 | sub getEndOffset | ||||
| 132 | { | ||||
| 133 | my $self = shift ; | ||||
| 134 | $self->{Inf}->getEndOffset(); | ||||
| 135 | } | ||||
| 136 | |||||
| 137 | sub resetLastBlockByte | ||||
| 138 | { | ||||
| 139 | my $self = shift ; | ||||
| 140 | $self->{Inf}->resetLastBlockByte(@_); | ||||
| 141 | } | ||||
| 142 | |||||
| 143 | sub createDeflateStream | ||||
| 144 | { | ||||
| 145 | my $self = shift ; | ||||
| 146 | my $deflate = $self->{Inf}->createDeflateStream(@_); | ||||
| 147 | return bless {'Def' => $deflate, | ||||
| 148 | 'CompSize' => 0, | ||||
| 149 | 'UnCompSize' => 0, | ||||
| 150 | 'Error' => '', | ||||
| 151 | }, 'IO::Compress::Adapter::Deflate'; | ||||
| 152 | } | ||||
| 153 | |||||
| 154 | 1 | 4µs | 1; | ||
| 155 | |||||
| 156 | |||||
| 157 | __END__ |