← Index
NYTProf Performance Profile   « line view »
For /Users/brian/bin/perls/cpan5.26.1
  Run on Sat Dec 30 01:41:10 2017
Reported on Sat Dec 30 01:44:15 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/IO/Uncompress/Adapter/Bunzip2.pm
StatementsExecuted 14 statements in 1.41ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.43ms7.34msIO::Uncompress::Adapter::Bunzip2::::BEGIN@9IO::Uncompress::Adapter::Bunzip2::BEGIN@9
11142µs46µsIO::Uncompress::Adapter::Bunzip2::::BEGIN@3IO::Uncompress::Adapter::Bunzip2::BEGIN@3
11123µs32µsIO::Uncompress::Adapter::Bunzip2::::BEGIN@4IO::Uncompress::Adapter::Bunzip2::BEGIN@4
11118µs155µsIO::Uncompress::Adapter::Bunzip2::::BEGIN@7IO::Uncompress::Adapter::Bunzip2::BEGIN@7
11111µs13µsIO::Uncompress::Adapter::Bunzip2::::BEGIN@5IO::Uncompress::Adapter::Bunzip2::BEGIN@5
0000s0sIO::Uncompress::Adapter::Bunzip2::::adler32IO::Uncompress::Adapter::Bunzip2::adler32
0000s0sIO::Uncompress::Adapter::Bunzip2::::compressedBytesIO::Uncompress::Adapter::Bunzip2::compressedBytes
0000s0sIO::Uncompress::Adapter::Bunzip2::::crc32IO::Uncompress::Adapter::Bunzip2::crc32
0000s0sIO::Uncompress::Adapter::Bunzip2::::mkUncompObjectIO::Uncompress::Adapter::Bunzip2::mkUncompObject
0000s0sIO::Uncompress::Adapter::Bunzip2::::resetIO::Uncompress::Adapter::Bunzip2::reset
0000s0sIO::Uncompress::Adapter::Bunzip2::::syncIO::Uncompress::Adapter::Bunzip2::sync
0000s0sIO::Uncompress::Adapter::Bunzip2::::uncomprIO::Uncompress::Adapter::Bunzip2::uncompr
0000s0sIO::Uncompress::Adapter::Bunzip2::::uncompressedBytesIO::Uncompress::Adapter::Bunzip2::uncompressedBytes
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package IO::Uncompress::Adapter::Bunzip2;
2
3241µs250µs
# spent 46µs (42+4) within IO::Uncompress::Adapter::Bunzip2::BEGIN@3 which was called: # once (42µs+4µs) by IO::Uncompress::Bunzip2::BEGIN@10 at line 3
use strict;
# spent 46µs making 1 call to IO::Uncompress::Adapter::Bunzip2::BEGIN@3 # spent 4µs making 1 call to strict::import
4240µs241µs
# spent 32µs (23+9) within IO::Uncompress::Adapter::Bunzip2::BEGIN@4 which was called: # once (23µs+9µs) by IO::Uncompress::Bunzip2::BEGIN@10 at line 4
use warnings;
# spent 32µs making 1 call to IO::Uncompress::Adapter::Bunzip2::BEGIN@4 # spent 9µs making 1 call to warnings::import
5240µs215µs
# spent 13µs (11+2) within IO::Uncompress::Adapter::Bunzip2::BEGIN@5 which was called: # once (11µs+2µs) by IO::Uncompress::Bunzip2::BEGIN@10 at line 5
use bytes;
# spent 13µs making 1 call to IO::Uncompress::Adapter::Bunzip2::BEGIN@5 # spent 2µs making 1 call to bytes::import
6
7366µs3292µs
# spent 155µs (18+137) within IO::Uncompress::Adapter::Bunzip2::BEGIN@7 which was called: # once (18µs+137µs) by IO::Uncompress::Bunzip2::BEGIN@10 at line 7
use IO::Compress::Base::Common 2.074 qw(:Status);
# spent 155µs making 1 call to IO::Uncompress::Adapter::Bunzip2::BEGIN@7 # spent 125µs making 1 call to Exporter::import # spent 12µs making 1 call to version::_VERSION
8
931.22ms37.58ms
# spent 7.34ms (1.43+5.92) within IO::Uncompress::Adapter::Bunzip2::BEGIN@9 which was called: # once (1.43ms+5.92ms) by IO::Uncompress::Bunzip2::BEGIN@10 at line 9
use Compress::Raw::Bzip2 2.074 ;
# spent 7.34ms making 1 call to IO::Uncompress::Adapter::Bunzip2::BEGIN@9 # spent 214µs making 1 call to Exporter::import # spent 20µs making 1 call to version::_VERSION
10
11our ($VERSION, @ISA);
1211µs$VERSION = '2.074';
13
14sub mkUncompObject
15{
16 my $small = shift || 0;
17 my $verbosity = shift || 0;
18
19 my ($inflate, $status) = new Compress::Raw::Bunzip2(1, 1, $small, $verbosity, 1);
20
21 return (undef, "Could not create Inflation object: $status", $status)
22 if $status != BZ_OK ;
23
24 return bless {'Inf' => $inflate,
25 'CompSize' => 0,
26 'UnCompSize' => 0,
27 'Error' => '',
28 'ConsumesInput' => 1,
29 } ;
30
31}
32
33sub uncompr
34{
35 my $self = shift ;
36 my $from = shift ;
37 my $to = shift ;
38 my $eof = shift ;
39
40 my $inf = $self->{Inf};
41
42 my $status = $inf->bzinflate($from, $to);
43 $self->{ErrorNo} = $status;
44
45 if ($status != BZ_OK && $status != BZ_STREAM_END )
46 {
47 $self->{Error} = "Inflation Error: $status";
48 return STATUS_ERROR;
49 }
50
51
52 return STATUS_OK if $status == BZ_OK ;
53 return STATUS_ENDSTREAM if $status == BZ_STREAM_END ;
54 return STATUS_ERROR ;
55}
56
57
58sub reset
59{
60 my $self = shift ;
61
62 my ($inf, $status) = new Compress::Raw::Bunzip2();
63 $self->{ErrorNo} = ($status == BZ_OK) ? 0 : $status ;
64
65 if ($status != BZ_OK)
66 {
67 $self->{Error} = "Cannot create Inflate object: $status";
68 return STATUS_ERROR;
69 }
70
71 $self->{Inf} = $inf;
72
73 return STATUS_OK ;
74}
75
76sub compressedBytes
77{
78 my $self = shift ;
79 $self->{Inf}->compressedBytes();
80}
81
82sub uncompressedBytes
83{
84 my $self = shift ;
85 $self->{Inf}->uncompressedBytes();
86}
87
88sub crc32
89{
90 my $self = shift ;
91 #$self->{Inf}->crc32();
92}
93
94sub adler32
95{
96 my $self = shift ;
97 #$self->{Inf}->adler32();
98}
99
100sub sync
101{
102 my $self = shift ;
103 #( $self->{Inf}->inflateSync(@_) == BZ_OK)
104 # ? STATUS_OK
105 # : STATUS_ERROR ;
106}
107
108
10916µs1;
110
111__END__