Blame view

vendor/nelexa/zip/src/Constants/GeneralPurposeBitFlag.php 1.98 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
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
  <?php
  
  namespace PhpZip\Constants;
  
  /**
   * General purpose bit flag constants.
   */
  interface GeneralPurposeBitFlag
  {
      /**
       * General Purpose Bit Flag mask for encrypted data.
       * Bit 0: If set, indicates that the file is encrypted.
       */
      const ENCRYPTION = 1; // 1 << 0
  
      /**
       * Compression Flag Bit 1 for method Deflating.
       *
       * Bit 2  Bit 1
       * 0      0    Normal compression
       * 0      1    Maximum compression
       * 1      0    Fast compression
       * 1      1    Super Fast compression
       *
       * @see GeneralPurposeBitFlag::COMPRESSION_FLAG2
       */
      const COMPRESSION_FLAG1 = 2; // 1 << 1
  
      /**
       * Compression Flag Bit 2 for method Deflating.
       *
       * Bit 2  Bit 1
       * 0      0    Normal compression
       * 0      1    Maximum compression
       * 1      0    Fast compression
       * 1      1    Super Fast compression
       *
       * @see GeneralPurposeBitFlag::COMPRESSION_FLAG1
       */
      const COMPRESSION_FLAG2 = 4; // 1 << 2
  
      /**
       * General Purpose Bit Flag mask for data descriptor.
       *
       * Bit 3: If this bit is set, the fields crc-32, compressed
       * size and uncompressed size are set to zero in the
       * local header. The correct values are put in the data
       * descriptor immediately following the compressed data.
       */
      const DATA_DESCRIPTOR = 8; // 1 << 3
  
      /**
       * General Purpose Bit Flag mask for strong encryption.
       *
       * Bit 6: Strong encryption.
       * If this bit is set, you MUST set the version needed to extract
       * value to at least 50 and you MUST also set bit 0.
       * If AES encryption is used, the version needed to extract value
       * MUST be at least 51.
       */
      const STRONG_ENCRYPTION = 64; // 1 << 6
  
      /**
       * General Purpose Bit Flag mask for UTF-8.
       *
       * Bit 11: Language encoding flag (EFS).
       * If this bit is set, the filename and comment fields
       * for this file MUST be encoded using UTF-8. (see APPENDIX D)
       */
      const UTF8 = 2048; // 1 << 11
  }