| Filename | /usr/libdata/perl5/amd64-openbsd/IO/Uncompress/Adapter/Inflate.pm |
| Statements | Executed 50 statements in 1.16ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 186µs | 1.96ms | IO::Uncompress::Adapter::Inflate::mkUncompObject |
| 2 | 1 | 1 | 103µs | 368µs | IO::Uncompress::Adapter::Inflate::uncompr |
| 1 | 1 | 1 | 32µs | 35µs | IO::Uncompress::Adapter::Inflate::BEGIN@3 |
| 1 | 1 | 1 | 27µs | 189µs | IO::Uncompress::Adapter::Inflate::BEGIN@7 |
| 1 | 1 | 1 | 19µs | 213µs | IO::Uncompress::Adapter::Inflate::BEGIN@8 |
| 1 | 1 | 1 | 13µs | 24µ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::reset |
| 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 | 39µs | 2 | 39µs | # spent 35µs (32+4) within IO::Uncompress::Adapter::Inflate::BEGIN@3 which was called:
# once (32µs+4µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 3 # spent 35µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@3
# spent 4µs making 1 call to strict::import |
| 4 | 2 | 74µs | 2 | 35µs | # spent 24µs (13+11) within IO::Uncompress::Adapter::Inflate::BEGIN@4 which was called:
# once (13µs+11µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 4 # spent 24µ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 | 64µs | 3 | 350µs | # spent 189µs (27+162) within IO::Uncompress::Adapter::Inflate::BEGIN@7 which was called:
# once (27µs+162µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 7 # spent 189µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@7
# spent 153µs making 1 call to Exporter::import
# spent 9µs making 1 call to UNIVERSAL::VERSION |
| 8 | 3 | 529µs | 3 | 406µs | # spent 213µs (19+194) within IO::Uncompress::Adapter::Inflate::BEGIN@8 which was called:
# once (19µs+194µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 8 # spent 213µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@8
# spent 185µ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 1.96ms (186µs+1.77) within IO::Uncompress::Adapter::Inflate::mkUncompObject which was called 2 times, avg 978µs/call:
# 2 times (186µs+1.77ms) by IO::Uncompress::RawInflate::mkUncomp at line 76 of IO/Uncompress/RawInflate.pm, avg 978µs/call | ||||
| 17 | 2 | 10µs | my $crc32 = shift || 1; | ||
| 18 | 2 | 2µs | my $adler32 = shift || 1; | ||
| 19 | 2 | 2µs | my $scan = shift || 0; | ||
| 20 | |||||
| 21 | 2 | 2µs | my $inflate ; | ||
| 22 | my $status ; | ||||
| 23 | |||||
| 24 | 2 | 4µ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 | 2 | 91µs | 4 | 1.71ms | ($inflate, $status) = new Compress::Raw::Zlib::Inflate # spent 1.67ms making 2 calls to Compress::Raw::Zlib::Inflate::new, avg 837µs/call
# spent 34µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 17µs/call |
| 35 | AppendOutput => 1, | ||||
| 36 | LimitOutput => 1, | ||||
| 37 | CRC32 => $crc32, | ||||
| 38 | ADLER32 => $adler32, | ||||
| 39 | WindowBits => - MAX_WBITS ; | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | 2 | 30µs | 2 | 58µs | return (undef, "Could not create Inflation object: $status", $status) # spent 37µs making 1 call to Compress::Raw::Zlib::AUTOLOAD
# spent 21µs making 1 call to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114] |
| 43 | if $status != Z_OK ; | ||||
| 44 | |||||
| 45 | 2 | 42µs | return bless {'Inf' => $inflate, | ||
| 46 | 'CompSize' => 0, | ||||
| 47 | 'UnCompSize' => 0, | ||||
| 48 | 'Error' => '', | ||||
| 49 | 'ConsumesInput' => 1, | ||||
| 50 | } ; | ||||
| 51 | |||||
| 52 | } | ||||
| 53 | |||||
| 54 | sub uncompr | ||||
| 55 | # spent 368µs (103+266) within IO::Uncompress::Adapter::Inflate::uncompr which was called 2 times, avg 184µs/call:
# 2 times (103µs+266µs) by IO::Uncompress::Base::_raw_read at line 913 of IO/Uncompress/Base.pm, avg 184µs/call | ||||
| 56 | 2 | 2µs | my $self = shift ; | ||
| 57 | 2 | 2µs | my $from = shift ; | ||
| 58 | 2 | 2µs | my $to = shift ; | ||
| 59 | 2 | 2µs | my $eof = shift ; | ||
| 60 | |||||
| 61 | 2 | 7µs | my $inf = $self->{Inf}; | ||
| 62 | |||||
| 63 | 2 | 183µs | 2 | 170µs | my $status = $inf->inflate($from, $to, $eof); # spent 170µs making 2 calls to Compress::Raw::Zlib::inflateStream::inflate, avg 85µs/call |
| 64 | 2 | 3µs | $self->{ErrorNo} = $status; | ||
| 65 | |||||
| 66 | 2 | 27µs | 4 | 56µs | if ($status != Z_OK && $status != Z_STREAM_END && $status != Z_BUF_ERROR) # spent 40µs making 1 call to Compress::Raw::Zlib::AUTOLOAD
# spent 16µs making 3 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 5µs/call |
| 67 | { | ||||
| 68 | $self->{Error} = "Inflation Error: $status"; | ||||
| 69 | return STATUS_ERROR; | ||||
| 70 | } | ||||
| 71 | |||||
| 72 | 2 | 18µs | 2 | 28µs | return STATUS_OK if $status == Z_BUF_ERROR ; # ??? # spent 22µs making 1 call to Compress::Raw::Zlib::AUTOLOAD
# spent 6µs making 1 call to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114] |
| 73 | 2 | 6µs | 2 | 4µs | return STATUS_OK if $status == Z_OK ; # spent 4µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call |
| 74 | 2 | 13µs | 2 | 4µs | return STATUS_ENDSTREAM if $status == Z_STREAM_END ; # spent 4µs making 2 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 | { | ||||
| 80 | my $self = shift ; | ||||
| 81 | $self->{Inf}->inflateReset(); | ||||
| 82 | |||||
| 83 | 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__ |