"Fossies" - the Fresh Open Source Software Archive

Member "IO-Compress-2.093/lib/IO/Compress/Zip/Constants.pm" (7 Dec 2019, 3848 Bytes) of package /linux/privat/IO-Compress-2.093.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Constants.pm" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.092_vs_2.093.

    1 package IO::Compress::Zip::Constants;
    2 
    3 use strict ;
    4 use warnings;
    5 
    6 require Exporter;
    7 
    8 our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS);
    9 
   10 $VERSION = '2.093';
   11 
   12 @ISA = qw(Exporter);
   13 
   14 @EXPORT= qw(
   15 
   16     ZIP_CM_STORE
   17     ZIP_CM_DEFLATE
   18     ZIP_CM_BZIP2
   19     ZIP_CM_LZMA
   20     ZIP_CM_PPMD
   21     
   22     ZIP_LOCAL_HDR_SIG
   23     ZIP_DATA_HDR_SIG
   24     ZIP_CENTRAL_HDR_SIG
   25     ZIP_END_CENTRAL_HDR_SIG
   26     ZIP64_END_CENTRAL_REC_HDR_SIG
   27     ZIP64_END_CENTRAL_LOC_HDR_SIG
   28     ZIP64_ARCHIVE_EXTRA_SIG
   29     ZIP64_DIGITAL_SIGNATURE_SIG
   30 
   31     ZIP_GP_FLAG_ENCRYPTED_MASK
   32     ZIP_GP_FLAG_STREAMING_MASK
   33     ZIP_GP_FLAG_PATCHED_MASK
   34     ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK
   35     ZIP_GP_FLAG_LZMA_EOS_PRESENT
   36     ZIP_GP_FLAG_LANGUAGE_ENCODING
   37 
   38     ZIP_EXTRA_ID_ZIP64
   39     ZIP_EXTRA_ID_EXT_TIMESTAMP
   40     ZIP_EXTRA_ID_INFO_ZIP_UNIX2
   41     ZIP_EXTRA_ID_INFO_ZIP_UNIXN
   42     ZIP_EXTRA_ID_INFO_ZIP_Upath
   43     ZIP_EXTRA_ID_INFO_ZIP_Ucom        
   44     ZIP_EXTRA_ID_JAVA_EXE
   45 
   46     ZIP_OS_CODE_UNIX
   47     ZIP_OS_CODE_DEFAULT
   48 
   49     ZIP_IFA_TEXT_MASK
   50 
   51     %ZIP_CM_MIN_VERSIONS
   52     ZIP64_MIN_VERSION
   53 
   54     ZIP_A_RONLY
   55     ZIP_A_HIDDEN
   56     ZIP_A_SYSTEM
   57     ZIP_A_LABEL
   58     ZIP_A_DIR 
   59     ZIP_A_ARCHIVE
   60     );
   61 
   62 # Compression types supported
   63 use constant ZIP_CM_STORE                      => 0 ;
   64 use constant ZIP_CM_DEFLATE                    => 8 ;
   65 use constant ZIP_CM_BZIP2                      => 12 ;
   66 use constant ZIP_CM_LZMA                       => 14 ; # Not Supported yet
   67 use constant ZIP_CM_PPMD                       => 98 ; # Not Supported yet
   68 
   69 # General Purpose Flag
   70 use constant ZIP_GP_FLAG_ENCRYPTED_MASK        => (1 << 0) ;
   71 use constant ZIP_GP_FLAG_STREAMING_MASK        => (1 << 3) ;
   72 use constant ZIP_GP_FLAG_PATCHED_MASK          => (1 << 5) ;
   73 use constant ZIP_GP_FLAG_STRONG_ENCRYPTED_MASK => (1 << 6) ;
   74 use constant ZIP_GP_FLAG_LZMA_EOS_PRESENT      => (1 << 1) ;
   75 use constant ZIP_GP_FLAG_LANGUAGE_ENCODING     => (1 << 11) ;
   76 
   77 # Internal File Attributes
   78 use constant ZIP_IFA_TEXT_MASK                 => 1;
   79 
   80 # Signatures for each of the headers
   81 use constant ZIP_LOCAL_HDR_SIG                 => 0x04034b50;
   82 use constant ZIP_DATA_HDR_SIG                  => 0x08074b50;
   83 use constant packed_ZIP_DATA_HDR_SIG           => pack "V", ZIP_DATA_HDR_SIG;
   84 use constant ZIP_CENTRAL_HDR_SIG               => 0x02014b50;
   85 use constant ZIP_END_CENTRAL_HDR_SIG           => 0x06054b50;
   86 use constant ZIP64_END_CENTRAL_REC_HDR_SIG     => 0x06064b50;
   87 use constant ZIP64_END_CENTRAL_LOC_HDR_SIG     => 0x07064b50;
   88 use constant ZIP64_ARCHIVE_EXTRA_SIG           => 0x08064b50;
   89 use constant ZIP64_DIGITAL_SIGNATURE_SIG       => 0x05054b50;
   90 
   91 use constant ZIP_OS_CODE_UNIX                  => 3;
   92 use constant ZIP_OS_CODE_DEFAULT               => 3;
   93 
   94 # Extra Field ID's
   95 use constant ZIP_EXTRA_ID_ZIP64                => pack "v", 1;
   96 use constant ZIP_EXTRA_ID_EXT_TIMESTAMP        => "UT";
   97 use constant ZIP_EXTRA_ID_INFO_ZIP_UNIX2       => "Ux";
   98 use constant ZIP_EXTRA_ID_INFO_ZIP_UNIXN       => "ux";
   99 use constant ZIP_EXTRA_ID_INFO_ZIP_Upath       => "up";
  100 use constant ZIP_EXTRA_ID_INFO_ZIP_Ucom        => "uc";
  101 use constant ZIP_EXTRA_ID_JAVA_EXE             => pack "v", 0xCAFE;
  102 
  103 # DOS Attributes
  104 use constant ZIP_A_RONLY                       => 0x01;
  105 use constant ZIP_A_HIDDEN                      => 0x02;
  106 use constant ZIP_A_SYSTEM                      => 0x04;
  107 use constant ZIP_A_LABEL                       => 0x08;
  108 use constant ZIP_A_DIR                         => 0x10;
  109 use constant ZIP_A_ARCHIVE                     => 0x20;
  110 
  111 use constant ZIP64_MIN_VERSION                 => 45;
  112 
  113 %ZIP_CM_MIN_VERSIONS = (
  114             ZIP_CM_STORE()                     => 20,
  115             ZIP_CM_DEFLATE()                   => 20,
  116             ZIP_CM_BZIP2()                     => 46,
  117             ZIP_CM_LZMA()                      => 63,
  118             ZIP_CM_PPMD()                      => 63,
  119             );
  120 
  121 
  122 1;
  123 
  124 __END__
  125