← Index
NYTProf Performance Profile   « block view • line view • sub view »
For ddd2.pl
  Run on Tue May 25 16:52:24 2010
Reported on Tue May 25 16:56:52 2010

File /project/perl/lib/IO/Compress/Gzip/Constants.pm
Statements Executed 101
Statement Execution Time 3.52ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11211µs11µsIO::Compress::Gzip::Constants::::CORE:packIO::Compress::Gzip::Constants::CORE:pack (opcode)
0000s0sIO::Compress::Gzip::Constants::::BEGINIO::Compress::Gzip::Constants::BEGIN
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package IO::Compress::Gzip::Constants;
2
3388µs125µsuse strict ;
# spent 25µs making 1 call to strict::import
4378µs1119µsuse warnings;
# spent 119µs making 1 call to warnings::import
53315µs115µsuse bytes;
# spent 15µs making 1 call to bytes::import
6
716µsrequire Exporter;
8
915µsour ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names);
1014µsour ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE);
11
1215µs$VERSION = '2.005';
13
14110µs@ISA = qw(Exporter);
15
16118µs@EXPORT= qw(
17
18 GZIP_ID_SIZE
19 GZIP_ID1
20 GZIP_ID2
21
22 GZIP_FLG_DEFAULT
23 GZIP_FLG_FTEXT
24 GZIP_FLG_FHCRC
25 GZIP_FLG_FEXTRA
26 GZIP_FLG_FNAME
27 GZIP_FLG_FCOMMENT
28 GZIP_FLG_RESERVED
29
30 GZIP_CM_DEFLATED
31
32 GZIP_MIN_HEADER_SIZE
33 GZIP_TRAILER_SIZE
34
35 GZIP_MTIME_DEFAULT
36 GZIP_XFL_DEFAULT
37 GZIP_FEXTRA_HEADER_SIZE
38 GZIP_FEXTRA_MAX_SIZE
39 GZIP_FEXTRA_SUBFIELD_HEADER_SIZE
40 GZIP_FEXTRA_SUBFIELD_ID_SIZE
41 GZIP_FEXTRA_SUBFIELD_LEN_SIZE
42 GZIP_FEXTRA_SUBFIELD_MAX_SIZE
43
44 $GZIP_FNAME_INVALID_CHAR_RE
45 $GZIP_FCOMMENT_INVALID_CHAR_RE
46
47 GZIP_FHCRC_SIZE
48
49 GZIP_ISIZE_MAX
50 GZIP_ISIZE_MOD_VALUE
51
52
53 GZIP_NULL_BYTE
54
55 GZIP_OS_DEFAULT
56
57 %GZIP_OS_Names
58
59 GZIP_MINIMUM_HEADER
60
61 );
62
63# Constant names derived from RFC 1952
64
65399µs1201µsuse constant GZIP_ID_SIZE => 2 ;
# spent 201µs making 1 call to constant::import
66392µs1182µsuse constant GZIP_ID1 => 0x1F;
# spent 182µs making 1 call to constant::import
67392µs1232µsuse constant GZIP_ID2 => 0x8B;
# spent 232µs making 1 call to constant::import
68
69389µs1192µsuse constant GZIP_MIN_HEADER_SIZE => 10 ;# minimum gzip header size
# spent 192µs making 1 call to constant::import
70391µs1193µsuse constant GZIP_TRAILER_SIZE => 8 ;
# spent 193µs making 1 call to constant::import
71
72
73389µs1173µsuse constant GZIP_FLG_DEFAULT => 0x00 ;
# spent 173µs making 1 call to constant::import
74389µs1172µsuse constant GZIP_FLG_FTEXT => 0x01 ;
# spent 172µs making 1 call to constant::import
75393µs1188µsuse constant GZIP_FLG_FHCRC => 0x02 ; # called CONTINUATION in gzip
# spent 188µs making 1 call to constant::import
76393µs1187µsuse constant GZIP_FLG_FEXTRA => 0x04 ;
# spent 187µs making 1 call to constant::import
77395µs1193µsuse constant GZIP_FLG_FNAME => 0x08 ;
# spent 193µs making 1 call to constant::import
783104µs1175µsuse constant GZIP_FLG_FCOMMENT => 0x10 ;
# spent 175µs making 1 call to constant::import
79#use constant GZIP_FLG_ENCRYPTED => 0x20 ; # documented in gzip sources
803113µs1177µsuse constant GZIP_FLG_RESERVED => (0x20 | 0x40 | 0x80) ;
# spent 177µs making 1 call to constant::import
81
82394µs1174µsuse constant GZIP_XFL_DEFAULT => 0x00 ;
# spent 174µs making 1 call to constant::import
83
84389µs1174µsuse constant GZIP_MTIME_DEFAULT => 0x00 ;
# spent 174µs making 1 call to constant::import
85
86387µs1196µsuse constant GZIP_FEXTRA_HEADER_SIZE => 2 ;
# spent 196µs making 1 call to constant::import
87391µs1178µsuse constant GZIP_FEXTRA_MAX_SIZE => 0xFF ;
# spent 178µs making 1 call to constant::import
88394µs1182µsuse constant GZIP_FEXTRA_SUBFIELD_ID_SIZE => 2 ;
# spent 182µs making 1 call to constant::import
893101µs1203µsuse constant GZIP_FEXTRA_SUBFIELD_LEN_SIZE => 2 ;
# spent 203µs making 1 call to constant::import
90use constant GZIP_FEXTRA_SUBFIELD_HEADER_SIZE => GZIP_FEXTRA_SUBFIELD_ID_SIZE +
# spent 173µs making 1 call to constant::import
913116µs GZIP_FEXTRA_SUBFIELD_LEN_SIZE;
92use constant GZIP_FEXTRA_SUBFIELD_MAX_SIZE => GZIP_FEXTRA_MAX_SIZE -
# spent 175µs making 1 call to constant::import
933199µs GZIP_FEXTRA_SUBFIELD_HEADER_SIZE ;
94
95
96320µsif (ord('A') == 193)
97{
98 # EBCDIC
99 $GZIP_FNAME_INVALID_CHAR_RE = '[\x00-\x03\x37\x2d-\x2f\x16\x05\x15\x0b-\x13\x3c\x3d\x32\x26\x18\x19\x3f\x27\x1c-\x1f\x07\x20-\x25\x06\x17\x28-\x2c\x09\x0a\x1b\x30\x31\x1a\x33-\x36\x08\x38-\x3b\x04\x14\x3e\xff]';
100 $GZIP_FCOMMENT_INVALID_CHAR_RE = '[\x00-\x03\x37\x2d-\x2f\x16\x05\x15\x0b-\x0f\x11-\x13\x3c\x3d\x32\x26\x18\x19\x3f\x27\x1c-\x1f\x07\x20-\x25\x06\x17\x28-\x2c\x09\x0a\x1b\x30\x31\x1a\x33-\x36\x08\x38-\x3b\x04\x14\x3e\xff]';
101
102}
103else
104{
105 $GZIP_FNAME_INVALID_CHAR_RE = '[\x00-\x1F\x7F-\x9F]';
106 $GZIP_FCOMMENT_INVALID_CHAR_RE = '[\x00-\x09\x11-\x1F\x7F-\x9F]';
107}
108
109391µs1177µsuse constant GZIP_FHCRC_SIZE => 2 ; # aka CONTINUATION in gzip
# spent 177µs making 1 call to constant::import
110
1113110µs1204µsuse constant GZIP_CM_DEFLATED => 8 ;
# spent 204µs making 1 call to constant::import
112
113393µs1185µsuse constant GZIP_NULL_BYTE => "\x00";
# spent 185µs making 1 call to constant::import
114399µs1182µsuse constant GZIP_ISIZE_MAX => 0xFFFFFFFF ;
# spent 182µs making 1 call to constant::import
115393µs1186µsuse constant GZIP_ISIZE_MOD_VALUE => GZIP_ISIZE_MAX + 1 ;
# spent 186µs making 1 call to constant::import
116
117# OS Names sourced from http://www.gzip.org/format.txt
118
1193255µs1182µsuse constant GZIP_OS_DEFAULT=> 0xFF ;
# spent 182µs making 1 call to constant::import
120140µs%GZIP_OS_Names = (
121 0 => 'MS-DOS',
122 1 => 'Amiga',
123 2 => 'VMS',
124 3 => 'Unix',
125 4 => 'VM/CMS',
126 5 => 'Atari TOS',
127 6 => 'HPFS (OS/2, NT)',
128 7 => 'Macintosh',
129 8 => 'Z-System',
130 9 => 'CP/M',
131 10 => 'TOPS-20',
132 11 => 'NTFS (NT)',
133 12 => 'SMS QDOS',
134 13 => 'Acorn RISCOS',
135 14 => 'VFAT file system (Win95, NT)',
136 15 => 'MVS',
137 16 => 'BeOS',
138 17 => 'Tandem/NSK',
139 18 => 'THEOS',
140 GZIP_OS_DEFAULT() => 'Unknown',
141 ) ;
142
143use constant GZIP_MINIMUM_HEADER => pack("C4 V C C",
# spent 185µs making 1 call to constant::import # spent 11µs making 1 call to IO::Compress::Gzip::Constants::CORE:pack
144 GZIP_ID1, GZIP_ID2, GZIP_CM_DEFLATED, GZIP_FLG_DEFAULT,
1453149µs GZIP_MTIME_DEFAULT, GZIP_XFL_DEFAULT, GZIP_OS_DEFAULT) ;
146
147
148133µs1;
# spent 11µs within IO::Compress::Gzip::Constants::CORE:pack which was called # once (11µs+0s) by Net::HTTP::Methods::zlib_ok at line 143 of IO/Compress/Gzip/Constants.pm
sub IO::Compress::Gzip::Constants::CORE:pack; # xsub