← Index
Performance Profile   « block view • line view • sub view »
For /wise/base/deliv/dev/bin/getfix
  Run on Thu May 20 15:30:03 2010
Reported on Thu May 20 16:25:34 2010

File/opt/wise/lib/perl5/5.10.0/x86_64-linux-thread-multi/IO/Uncompress/Adapter/Inflate.pm
Statements Executed18
Total Time0.00084 seconds

Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
00000IO::Uncompress::Adapter::Inflate::BEGIN
00000IO::Uncompress::Adapter::Inflate::adler32
00000IO::Uncompress::Adapter::Inflate::compressedBytes
00000IO::Uncompress::Adapter::Inflate::crc32
00000IO::Uncompress::Adapter::Inflate::createDeflateStream
00000IO::Uncompress::Adapter::Inflate::getEndOffset
00000IO::Uncompress::Adapter::Inflate::getLastBlockOffset
00000IO::Uncompress::Adapter::Inflate::mkUncompObject
00000IO::Uncompress::Adapter::Inflate::reset
00000IO::Uncompress::Adapter::Inflate::resetLastBlockByte
00000IO::Uncompress::Adapter::Inflate::sync
00000IO::Uncompress::Adapter::Inflate::uncompr
00000IO::Uncompress::Adapter::Inflate::uncompressedBytes

LineStmts.Exclusive
Time
Avg.Code
1package IO::Uncompress::Adapter::Inflate;
2
332.8e-59.3e-6use strict;
# spent 10µs making 1 call to strict::import
433.3e-51.1e-5use warnings;
# spent 25µs making 1 call to warnings::import
533.2e-51.1e-5use bytes;
# spent 7µs making 1 call to bytes::import
6
736.7e-52.2e-5use IO::Compress::Base::Common 2.008 qw(:Status);
# spent 177µs making 1 call to Exporter::import # spent 26µs making 1 call to UNIVERSAL::VERSION
830.000670.00022use Compress::Raw::Zlib 2.008 qw(Z_OK Z_DATA_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
# spent 59µs making 1 call to Exporter::import # spent 21µs making 1 call to UNIVERSAL::VERSION
9
10100our ($VERSION);
1112.0e-62.0e-6$VERSION = '2.008';
12
13
14
15sub mkUncompObject
16{
17 my $crc32 = shift || 1;
18 my $adler32 = shift || 1;
19 my $scan = shift || 0;
20
21 my $inflate ;
22 my $status ;
23
24 if ($scan)
25 {
26 ($inflate, $status) = new Compress::Raw::Zlib::InflateScan
27 CRC32 => $crc32,
28 ADLER32 => $adler32,
29 WindowBits => - MAX_WBITS ;
30 }
31 else
32 {
33 ($inflate, $status) = new Compress::Raw::Zlib::Inflate
34 AppendOutput => 1,
35 CRC32 => $crc32,
36 ADLER32 => $adler32,
37 WindowBits => - MAX_WBITS ;
38 }
39
40 return (undef, "Could not create Inflation object: $status", $status)
41 if $status != Z_OK ;
42
43 return bless {'Inf' => $inflate,
44 'CompSize' => 0,
45 'UnCompSize' => 0,
46 'Error' => '',
47 } ;
48
49}
50
51sub uncompr
52{
53 my $self = shift ;
54 my $from = shift ;
55 my $to = shift ;
56 my $eof = shift ;
57
58 my $inf = $self->{Inf};
59
60 my $status = $inf->inflate($from, $to, $eof);
61 $self->{ErrorNo} = $status;
62
63 if ($status != Z_STREAM_END && $eof)
64 {
65 $self->{Error} = "unexpected end of file";
66 return STATUS_ERROR;
67 }
68
69 if ($status != Z_OK && $status != Z_STREAM_END )
70 {
71 $self->{Error} = "Inflation Error: $status";
72 return STATUS_ERROR;
73 }
74
75
76 return STATUS_OK if $status == Z_OK ;
77 return STATUS_ENDSTREAM if $status == Z_STREAM_END ;
78 return STATUS_ERROR ;
79}
80
81sub reset
82{
83 my $self = shift ;
84 $self->{Inf}->inflateReset();
85
86 return STATUS_OK ;
87}
88
89#sub count
90#{
91# my $self = shift ;
92# $self->{Inf}->inflateCount();
93#}
94
95sub crc32
96{
97 my $self = shift ;
98 $self->{Inf}->crc32();
99}
100
101sub compressedBytes
102{
103 my $self = shift ;
104 $self->{Inf}->compressedBytes();
105}
106
107sub uncompressedBytes
108{
109 my $self = shift ;
110 $self->{Inf}->uncompressedBytes();
111}
112
113sub adler32
114{
115 my $self = shift ;
116 $self->{Inf}->adler32();
117}
118
119sub sync
120{
121 my $self = shift ;
122 ( $self->{Inf}->inflateSync(@_) == Z_OK)
123 ? STATUS_OK
124 : STATUS_ERROR ;
125}
126
127
128sub getLastBlockOffset
129{
130 my $self = shift ;
131 $self->{Inf}->getLastBlockOffset();
132}
133
134sub getEndOffset
135{
136 my $self = shift ;
137 $self->{Inf}->getEndOffset();
138}
139
140sub resetLastBlockByte
141{
142 my $self = shift ;
143 $self->{Inf}->resetLastBlockByte(@_);
144}
145
146sub createDeflateStream
147{
148 my $self = shift ;
149 my $deflate = $self->{Inf}->createDeflateStream(@_);
150 return bless {'Def' => $deflate,
151 'CompSize' => 0,
152 'UnCompSize' => 0,
153 'Error' => '',
154 }, 'IO::Compress::Adapter::Deflate';
155}
156
15714.0e-64.0e-61;
158
159
160__END__
161