<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package IO::Compress::Zip::Constants;

use strict ;
use warnings;

require Exporter;

our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS);

$VERSION = '2.204';

@ISA = qw(Exporter);

@EXPORT= qw(

    ZIP_CM_STORE
    ZIP_CM_DEFLATE
    ZIP_CM_BZIP2
    ZIP_CM_LZMA
    ZIP_CM_PPMD
    ZIP_CM_XZ
    ZIP_CM_ZSTD
    ZIP_CM_AES

    ZIP_LOCAL_HDR_SIG
    ZIP_DATA_HDR_SIG
    ZIP_CENTRAL_HDR_SIG
    ZIP_END_CENTRAL_HDR_SIG
    ZIP64_END_CENTRAL_REC_HDR_SIG
    ZIP64_END_CENTRAL_LOC_HDR_SIG
    ZIP64_ARCHIVE_EXTRA_SIG
    ZIP64_DIGITAL_SIGNATURE_SIG

    ZIP_GP_FLAG_ENCRYPTED_MASK
    ZIP_GP_FLAG_STREAMING_MASK
    ZIP_GP_FLAG_PATCHED_MASK
    ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK
    ZIP_GP_FLAG_LZMA_EOS_PRESENT
    ZIP_GP_FLAG_LANGUAGE_ENCODING

    ZIP_EXTRA_ID_ZIP64
    ZIP_EXTRA_ID_EXT_TIMESTAMP
    ZIP_EXTRA_ID_INFO_ZIP_UNIX2
    ZIP_EXTRA_ID_INFO_ZIP_UNIXN
    ZIP_EXTRA_ID_INFO_ZIP_Upath
    ZIP_EXTRA_ID_INFO_ZIP_Ucom
    ZIP_EXTRA_ID_JAVA_EXE

    ZIP_OS_CODE_UNIX
    ZIP_OS_CODE_DEFAULT

    ZIP_IFA_TEXT_MASK

    %ZIP_CM_MIN_VERSIONS
    ZIP64_MIN_VERSION

    ZIP_A_RONLY
    ZIP_A_HIDDEN
    ZIP_A_SYSTEM
    ZIP_A_LABEL
    ZIP_A_DIR
    ZIP_A_ARCHIVE
    );

# Compression types supported
use constant ZIP_CM_STORE                      =&gt; 0 ;
use constant ZIP_CM_DEFLATE                    =&gt; 8 ;
use constant ZIP_CM_BZIP2                      =&gt; 12 ;
use constant ZIP_CM_LZMA                       =&gt; 14 ;
use constant ZIP_CM_ZSTD                       =&gt; 93 ;
use constant ZIP_CM_XZ                         =&gt; 95 ;
use constant ZIP_CM_PPMD                       =&gt; 98 ; # Not Supported yet
use constant ZIP_CM_AES                        =&gt; 99 ;

# General Purpose Flag
use constant ZIP_GP_FLAG_ENCRYPTED_MASK        =&gt; (1 &lt;&lt; 0) ;
use constant ZIP_GP_FLAG_STREAMING_MASK        =&gt; (1 &lt;&lt; 3) ;
use constant ZIP_GP_FLAG_PATCHED_MASK          =&gt; (1 &lt;&lt; 5) ;
use constant ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK =&gt; (1 &lt;&lt; 6) ;
use constant ZIP_GP_FLAG_LZMA_EOS_PRESENT      =&gt; (1 &lt;&lt; 1) ;
use constant ZIP_GP_FLAG_LANGUAGE_ENCODING     =&gt; (1 &lt;&lt; 11) ;

# Internal File Attributes
use constant ZIP_IFA_TEXT_MASK                 =&gt; 1;

# Signatures for each of the headers
use constant ZIP_LOCAL_HDR_SIG                 =&gt; 0x04034b50;
use constant ZIP_DATA_HDR_SIG                  =&gt; 0x08074b50;
use constant packed_ZIP_DATA_HDR_SIG           =&gt; pack "V", ZIP_DATA_HDR_SIG;
use constant ZIP_CENTRAL_HDR_SIG               =&gt; 0x02014b50;
use constant ZIP_END_CENTRAL_HDR_SIG           =&gt; 0x06054b50;
use constant ZIP64_END_CENTRAL_REC_HDR_SIG     =&gt; 0x06064b50;
use constant ZIP64_END_CENTRAL_LOC_HDR_SIG     =&gt; 0x07064b50;
use constant ZIP64_ARCHIVE_EXTRA_SIG           =&gt; 0x08064b50;
use constant ZIP64_DIGITAL_SIGNATURE_SIG       =&gt; 0x05054b50;

use constant ZIP_OS_CODE_UNIX                  =&gt; 3;
use constant ZIP_OS_CODE_DEFAULT               =&gt; 3;

# Extra Field ID's
use constant ZIP_EXTRA_ID_ZIP64                =&gt; pack "v", 1;
use constant ZIP_EXTRA_ID_EXT_TIMESTAMP        =&gt; "UT";
use constant ZIP_EXTRA_ID_INFO_ZIP_UNIX2       =&gt; "Ux";
use constant ZIP_EXTRA_ID_INFO_ZIP_UNIXN       =&gt; "ux";
use constant ZIP_EXTRA_ID_INFO_ZIP_Upath       =&gt; "up";
use constant ZIP_EXTRA_ID_INFO_ZIP_Ucom        =&gt; "uc";
use constant ZIP_EXTRA_ID_JAVA_EXE             =&gt; pack "v", 0xCAFE;

# DOS Attributes
use constant ZIP_A_RONLY                       =&gt; 0x01;
use constant ZIP_A_HIDDEN                      =&gt; 0x02;
use constant ZIP_A_SYSTEM                      =&gt; 0x04;
use constant ZIP_A_LABEL                       =&gt; 0x08;
use constant ZIP_A_DIR                         =&gt; 0x10;
use constant ZIP_A_ARCHIVE                     =&gt; 0x20;

use constant ZIP64_MIN_VERSION                 =&gt; 45;

%ZIP_CM_MIN_VERSIONS = (
            ZIP_CM_STORE()                     =&gt; 20,
            ZIP_CM_DEFLATE()                   =&gt; 20,
            ZIP_CM_BZIP2()                     =&gt; 46,
            ZIP_CM_LZMA()                      =&gt; 63,
            ZIP_CM_PPMD()                      =&gt; 63,
            ZIP_CM_ZSTD()                      =&gt; 20, # Winzip needs these to be 20
            ZIP_CM_XZ()                        =&gt; 20,
            );


1;

__END__
</pre></body></html>