File | /opt/wise/lib/perl5/5.10.0/x86_64-linux-thread-multi/IO/Compress/Gzip/Constants.pm | Statements Executed | 101 | Total Time | 0.001205 seconds |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine | |
---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | IO::Compress::Gzip::Constants:: | BEGIN |
Line | Stmts. | Exclusive Time | Avg. | Code |
---|---|---|---|---|
1 | package IO::Compress::Gzip::Constants; | |||
2 | ||||
3 | 3 | 2.9e-5 | 9.7e-6 | use strict ; # spent 9µs making 1 call to strict::import |
4 | 3 | 2.6e-5 | 8.7e-6 | use warnings; # spent 27µs making 1 call to warnings::import |
5 | 3 | 0.00013 | 4.4e-5 | use bytes; # spent 7µs making 1 call to bytes::import |
6 | ||||
7 | 1 | 3.0e-6 | 3.0e-6 | require Exporter; |
8 | ||||
9 | 1 | 0 | 0 | our ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names); |
10 | 1 | 1.0e-6 | 1.0e-6 | our ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE); |
11 | ||||
12 | 1 | 1.0e-6 | 1.0e-6 | $VERSION = '2.008'; |
13 | ||||
14 | 1 | 6.0e-6 | 6.0e-6 | @ISA = qw(Exporter); |
15 | ||||
16 | 1 | 7.0e-6 | 7.0e-6 | @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 | ||||
65 | 3 | 3.7e-5 | 1.2e-5 | use constant GZIP_ID_SIZE => 2 ; # spent 80µs making 1 call to constant::import |
66 | 3 | 2.9e-5 | 9.7e-6 | use constant GZIP_ID1 => 0x1F; # spent 43µs making 1 call to constant::import |
67 | 3 | 2.8e-5 | 9.3e-6 | use constant GZIP_ID2 => 0x8B; # spent 43µs making 1 call to constant::import |
68 | ||||
69 | 3 | 2.8e-5 | 9.3e-6 | use constant GZIP_MIN_HEADER_SIZE => 10 ;# minimum gzip header size # spent 43µs making 1 call to constant::import |
70 | 3 | 3.2e-5 | 1.1e-5 | use constant GZIP_TRAILER_SIZE => 8 ; # spent 46µs making 1 call to constant::import |
71 | ||||
72 | ||||
73 | 3 | 2.7e-5 | 9.0e-6 | use constant GZIP_FLG_DEFAULT => 0x00 ; # spent 47µs making 1 call to constant::import |
74 | 3 | 2.7e-5 | 9.0e-6 | use constant GZIP_FLG_FTEXT => 0x01 ; # spent 45µs making 1 call to constant::import |
75 | 3 | 2.8e-5 | 9.3e-6 | use constant GZIP_FLG_FHCRC => 0x02 ; # called CONTINUATION in gzip # spent 42µs making 1 call to constant::import |
76 | 3 | 3.2e-5 | 1.1e-5 | use constant GZIP_FLG_FEXTRA => 0x04 ; # spent 45µs making 1 call to constant::import |
77 | 3 | 2.8e-5 | 9.3e-6 | use constant GZIP_FLG_FNAME => 0x08 ; # spent 44µs making 1 call to constant::import |
78 | 3 | 3.2e-5 | 1.1e-5 | use constant GZIP_FLG_FCOMMENT => 0x10 ; # spent 40µs making 1 call to constant::import |
79 | #use constant GZIP_FLG_ENCRYPTED => 0x20 ; # documented in gzip sources | |||
80 | 3 | 3.1e-5 | 1.0e-5 | use constant GZIP_FLG_RESERVED => (0x20 | 0x40 | 0x80) ; # spent 44µs making 1 call to constant::import |
81 | ||||
82 | 3 | 2.9e-5 | 9.7e-6 | use constant GZIP_XFL_DEFAULT => 0x00 ; # spent 41µs making 1 call to constant::import |
83 | ||||
84 | 3 | 3.1e-5 | 1.0e-5 | use constant GZIP_MTIME_DEFAULT => 0x00 ; # spent 52µs making 1 call to constant::import |
85 | ||||
86 | 3 | 2.6e-5 | 8.7e-6 | use constant GZIP_FEXTRA_HEADER_SIZE => 2 ; # spent 57µs making 1 call to constant::import |
87 | 3 | 2.7e-5 | 9.0e-6 | use constant GZIP_FEXTRA_MAX_SIZE => 0xFF ; # spent 49µs making 1 call to constant::import |
88 | 3 | 2.8e-5 | 9.3e-6 | use constant GZIP_FEXTRA_SUBFIELD_ID_SIZE => 2 ; # spent 42µs making 1 call to constant::import |
89 | 3 | 3.7e-5 | 1.2e-5 | use constant GZIP_FEXTRA_SUBFIELD_LEN_SIZE => 2 ; # spent 50µs making 1 call to constant::import |
90 | use constant GZIP_FEXTRA_SUBFIELD_HEADER_SIZE => GZIP_FEXTRA_SUBFIELD_ID_SIZE + # spent 58µs making 1 call to constant::import | |||
91 | 3 | 4.7e-5 | 1.6e-5 | GZIP_FEXTRA_SUBFIELD_LEN_SIZE; |
92 | use constant GZIP_FEXTRA_SUBFIELD_MAX_SIZE => GZIP_FEXTRA_MAX_SIZE - # spent 42µs making 1 call to constant::import | |||
93 | 3 | 7.8e-5 | 2.6e-5 | GZIP_FEXTRA_SUBFIELD_HEADER_SIZE ; |
94 | ||||
95 | ||||
96 | 3 | 3.0e-6 | 1.0e-6 | if (ord('A') == 193) |
97 | { | |||
98 | # EBCDIC | |||
99 | $GZIP_FNAME_INVALID_CHAR_RE = '[\x00-\x3f\xff]'; | |||
100 | $GZIP_FCOMMENT_INVALID_CHAR_RE = '[\x00-\x0a\x11-\x14\x16-\x3f\xff]'; | |||
101 | ||||
102 | } | |||
103 | else | |||
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 | ||||
109 | 3 | 3.5e-5 | 1.2e-5 | use constant GZIP_FHCRC_SIZE => 2 ; # aka CONTINUATION in gzip # spent 50µs making 1 call to constant::import |
110 | ||||
111 | 3 | 3.5e-5 | 1.2e-5 | use constant GZIP_CM_DEFLATED => 8 ; # spent 41µs making 1 call to constant::import |
112 | ||||
113 | 3 | 2.6e-5 | 8.7e-6 | use constant GZIP_NULL_BYTE => "\x00"; # spent 47µs making 1 call to constant::import |
114 | 3 | 3.2e-5 | 1.1e-5 | use constant GZIP_ISIZE_MAX => 0xFFFFFFFF ; # spent 41µs making 1 call to constant::import |
115 | 3 | 2.9e-5 | 9.7e-6 | use constant GZIP_ISIZE_MOD_VALUE => GZIP_ISIZE_MAX + 1 ; # spent 48µs making 1 call to constant::import |
116 | ||||
117 | # OS Names sourced from http://www.gzip.org/format.txt | |||
118 | ||||
119 | 3 | 8.0e-5 | 2.7e-5 | use constant GZIP_OS_DEFAULT=> 0xFF ; # spent 42µs making 1 call to constant::import |
120 | 1 | 2.2e-5 | 2.2e-5 | %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 | ||||
143 | use constant GZIP_MINIMUM_HEADER => pack("C4 V C C", # spent 44µs making 1 call to constant::import | |||
144 | GZIP_ID1, GZIP_ID2, GZIP_CM_DEFLATED, GZIP_FLG_DEFAULT, | |||
145 | 3 | 5.8e-5 | 1.9e-5 | GZIP_MTIME_DEFAULT, GZIP_XFL_DEFAULT, GZIP_OS_DEFAULT) ; |
146 | ||||
147 | ||||
148 | 1 | 1.7e-5 | 1.7e-5 | 1; |