blob: 4c2d5eb00f6f76616d467d807b358226021f00f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
package IO::Compress::Zlib::Constants ;
use strict ;
use warnings;
use bytes;
require Exporter;
our ($VERSION, @ISA, @EXPORT);
$VERSION = '2.033';
@ISA = qw(Exporter);
@EXPORT= qw(
ZLIB_HEADER_SIZE
ZLIB_TRAILER_SIZE
ZLIB_CMF_CM_OFFSET
ZLIB_CMF_CM_BITS
ZLIB_CMF_CM_DEFLATED
ZLIB_CMF_CINFO_OFFSET
ZLIB_CMF_CINFO_BITS
ZLIB_CMF_CINFO_MAX
ZLIB_FLG_FCHECK_OFFSET
ZLIB_FLG_FCHECK_BITS
ZLIB_FLG_FDICT_OFFSET
ZLIB_FLG_FDICT_BITS
ZLIB_FLG_LEVEL_OFFSET
ZLIB_FLG_LEVEL_BITS
ZLIB_FLG_LEVEL_FASTEST
ZLIB_FLG_LEVEL_FAST
ZLIB_FLG_LEVEL_DEFAULT
ZLIB_FLG_LEVEL_SLOWEST
ZLIB_FDICT_SIZE
);
# Constant names derived from RFC1950
use constant ZLIB_HEADER_SIZE => 2;
use constant ZLIB_TRAILER_SIZE => 4;
use constant ZLIB_CMF_CM_OFFSET => 0;
use constant ZLIB_CMF_CM_BITS => 0xF ; # 0b1111
use constant ZLIB_CMF_CM_DEFLATED => 8;
use constant ZLIB_CMF_CINFO_OFFSET => 4;
use constant ZLIB_CMF_CINFO_BITS => 0xF ; # 0b1111;
use constant ZLIB_CMF_CINFO_MAX => 7;
use constant ZLIB_FLG_FCHECK_OFFSET => 0;
use constant ZLIB_FLG_FCHECK_BITS => 0x1F ; # 0b11111;
use constant ZLIB_FLG_FDICT_OFFSET => 5;
use constant ZLIB_FLG_FDICT_BITS => 0x1 ; # 0b1;
use constant ZLIB_FLG_LEVEL_OFFSET => 6;
use constant ZLIB_FLG_LEVEL_BITS => 0x3 ; # 0b11;
use constant ZLIB_FLG_LEVEL_FASTEST => 0;
use constant ZLIB_FLG_LEVEL_FAST => 1;
use constant ZLIB_FLG_LEVEL_DEFAULT => 2;
use constant ZLIB_FLG_LEVEL_SLOWEST => 3;
use constant ZLIB_FDICT_SIZE => 4;
1;
|