This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update IO-Compress to CPAN version 2.064
[perl5.git] / cpan / IO-Compress / lib / IO / Compress / Zlib / Constants.pm
CommitLineData
25f0751f
PM
1
2package IO::Compress::Zlib::Constants ;
3
4use strict ;
5use warnings;
6use bytes;
7
8require Exporter;
9
10our ($VERSION, @ISA, @EXPORT);
11
149b3664 12$VERSION = '2.064';
25f0751f
PM
13
14@ISA = qw(Exporter);
15
16@EXPORT= qw(
17
18 ZLIB_HEADER_SIZE
19 ZLIB_TRAILER_SIZE
20
21 ZLIB_CMF_CM_OFFSET
22 ZLIB_CMF_CM_BITS
23 ZLIB_CMF_CM_DEFLATED
24
25 ZLIB_CMF_CINFO_OFFSET
26 ZLIB_CMF_CINFO_BITS
258133d1 27 ZLIB_CMF_CINFO_MAX
25f0751f
PM
28
29 ZLIB_FLG_FCHECK_OFFSET
30 ZLIB_FLG_FCHECK_BITS
31
32 ZLIB_FLG_FDICT_OFFSET
33 ZLIB_FLG_FDICT_BITS
34
35 ZLIB_FLG_LEVEL_OFFSET
36 ZLIB_FLG_LEVEL_BITS
37
38 ZLIB_FLG_LEVEL_FASTEST
39 ZLIB_FLG_LEVEL_FAST
40 ZLIB_FLG_LEVEL_DEFAULT
41 ZLIB_FLG_LEVEL_SLOWEST
42
43 ZLIB_FDICT_SIZE
44
45 );
46
47# Constant names derived from RFC1950
48
49use constant ZLIB_HEADER_SIZE => 2;
50use constant ZLIB_TRAILER_SIZE => 4;
51
52use constant ZLIB_CMF_CM_OFFSET => 0;
53use constant ZLIB_CMF_CM_BITS => 0xF ; # 0b1111
54use constant ZLIB_CMF_CM_DEFLATED => 8;
55
56use constant ZLIB_CMF_CINFO_OFFSET => 4;
57use constant ZLIB_CMF_CINFO_BITS => 0xF ; # 0b1111;
258133d1 58use constant ZLIB_CMF_CINFO_MAX => 7;
25f0751f
PM
59
60use constant ZLIB_FLG_FCHECK_OFFSET => 0;
61use constant ZLIB_FLG_FCHECK_BITS => 0x1F ; # 0b11111;
62
63use constant ZLIB_FLG_FDICT_OFFSET => 5;
64use constant ZLIB_FLG_FDICT_BITS => 0x1 ; # 0b1;
65
66use constant ZLIB_FLG_LEVEL_OFFSET => 6;
67use constant ZLIB_FLG_LEVEL_BITS => 0x3 ; # 0b11;
68
69use constant ZLIB_FLG_LEVEL_FASTEST => 0;
70use constant ZLIB_FLG_LEVEL_FAST => 1;
71use constant ZLIB_FLG_LEVEL_DEFAULT => 2;
72use constant ZLIB_FLG_LEVEL_SLOWEST => 3;
73
74use constant ZLIB_FDICT_SIZE => 4;
75
76
771;