IO::Compress::* 2.003
[p5sagit/p5-mst-13.2.git] / ext / IO / Compress / Zlib / lib / IO / Compress / Zip / Constants.pm
CommitLineData
25f0751f 1package IO::Compress::Zip::Constants;
2
3use strict ;
4use warnings;
5
6require Exporter;
7
c70c1701 8our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS);
25f0751f 9
b0cda13f 10$VERSION = '2.003';
25f0751f 11
12@ISA = qw(Exporter);
13
14@EXPORT= qw(
15
2b4e0969 16 ZIP_CM_STORE
c70c1701 17 ZIP_CM_DEFLATE
2b4e0969 18 ZIP_CM_BZIP2
c70c1701 19
20 ZIP_LOCAL_HDR_SIG
21 ZIP_DATA_HDR_SIG
22 ZIP_CENTRAL_HDR_SIG
23 ZIP_END_CENTRAL_HDR_SIG
e7d45986 24 ZIP64_END_CENTRAL_REC_HDR_SIG
25 ZIP64_END_CENTRAL_LOC_HDR_SIG
26 ZIP64_ARCHIVE_EXTRA_SIG
27 ZIP64_DIGITAL_SIGNATURE_SIG
25f0751f 28
258133d1 29 ZIP_GP_FLAG_ENCRYPTED_MASK
c70c1701 30 ZIP_GP_FLAG_STREAMING_MASK
258133d1 31 ZIP_GP_FLAG_PATCHED_MASK
32 ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK
25f0751f 33
e7d45986 34 ZIP_EXTRA_ID_ZIP64
c70c1701 35 ZIP_EXTRA_ID_EXT_TIMESTAMP
36 ZIP_EXTRA_ID_INFO_ZIP_UNIX
25f0751f 37
c70c1701 38 ZIP_IFA_TEXT_MASK
25f0751f 39
c70c1701 40 %ZIP_CM_MIN_VERSIONS
e7d45986 41 ZIP64_MIN_VERSION
25f0751f 42
43 );
44
c70c1701 45# Compression types supported
46use constant ZIP_CM_STORE => 0 ;
47use constant ZIP_CM_DEFLATE => 8 ;
48use constant ZIP_CM_BZIP2 => 12 ;
25f0751f 49
c70c1701 50# General Purpose Flag
51use constant ZIP_GP_FLAG_ENCRYPTED_MASK => 1 ;
52use constant ZIP_GP_FLAG_STREAMING_MASK => 8 ;
258133d1 53use constant ZIP_GP_FLAG_PATCHED_MASK => 32 ;
54use constant ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK => 64 ;
25f0751f 55
c70c1701 56# Internal File Attributes
57use constant ZIP_IFA_TEXT_MASK => 1;
25f0751f 58
c70c1701 59# Signatures for each of the headers
60use constant ZIP_LOCAL_HDR_SIG => 0x04034b50;
61use constant ZIP_DATA_HDR_SIG => 0x08074b50;
62use constant ZIP_CENTRAL_HDR_SIG => 0x02014b50;
63use constant ZIP_END_CENTRAL_HDR_SIG => 0x06054b50;
e7d45986 64use constant ZIP64_END_CENTRAL_REC_HDR_SIG => 0x06064b50;
65use constant ZIP64_END_CENTRAL_LOC_HDR_SIG => 0x07064b50;
66use constant ZIP64_ARCHIVE_EXTRA_SIG => 0x08064b50;
67use constant ZIP64_DIGITAL_SIGNATURE_SIG => 0x05054b50;
25f0751f 68
c70c1701 69# Extra Field ID's
e7d45986 70use constant ZIP_EXTRA_ID_ZIP64 => pack "v", 1;
c70c1701 71use constant ZIP_EXTRA_ID_EXT_TIMESTAMP => "UT";
72use constant ZIP_EXTRA_ID_INFO_ZIP_UNIX => "Ux";
25f0751f 73
e7d45986 74use constant ZIP64_MIN_VERSION => 45;
75
c70c1701 76%ZIP_CM_MIN_VERSIONS = (
77 ZIP_CM_STORE() => 20,
78 ZIP_CM_DEFLATE() => 20,
79 ZIP_CM_BZIP2() => 46,
80 );
25f0751f 81
25f0751f 82
c70c1701 831;
25f0751f 84
c70c1701 85__END__
25f0751f 86