欢迎来到蓝梦软件下载中心!
免责声明:本站软件仅用于恢复和销毁存储介质数据,如果涉及个人隐私等问题,请使用者自行承担,使用软件默认同意本声明!
Q Q:1731278955
传真:0510-82737376
手机:13400027332
E-mail:1731278955@qq.com

技术文章
您所在的位置:首页 > 技术文章 >

ZIP压缩文件数据结构解析六



作者: 来源: 日期:2018/1/7 7:11:35 人气:4 

          Bit 12: Reserved by PKWARE for enhanced compression.

          Bit 13: Used when encrypting the Central Directory to indicate 

                  selected data values in the Local Header are masked to

                  hide their actual values.  See the section describing 

                  the Strong Encryption Specification for details.

          Bit 14: Reserved by PKWARE.

          Bit 15: Reserved by PKWARE.

      compression method: (2 bytes)

          (see accompanying documentation for algorithm

          descriptions)

          0 - The file is stored (no compression)

          1 - The file is Shrunk

          2 - The file is Reduced with compression factor 1

          3 - The file is Reduced with compression factor 2

          4 - The file is Reduced with compression factor 3

          5 - The file is Reduced with compression factor 4

          6 - The file is Imploded

          7 - Reserved for Tokenizing compression algorithm

          8 - The file is Deflated

          9 - Enhanced Deflating using Deflate64(tm)

         10 - PKWARE Data Compression Library Imploding

         11 - Reserved by PKWARE

         12 - File is compressed using BZIP2 algorithm

      date and time fields: (2 bytes each)

          The date and time are encoded in standard MS-DOS format.

          If input came from standard input, the date and time are

          those at which compression was started for this data. 

          If encrypting the central directory and general purpose bit 

          flag 13 is set indicating masking, the value stored in the 

          Local Header will be zero. 

      CRC-32: (4 bytes)

          The CRC-32 algorithm was generously contributed by

          David Schwaderer and can be found in his excellent

          book "C Programmers Guide to NetBIOS" published by

          Howard W. Sams & Co. Inc.  The 'magic number' for

          the CRC is 0xdebb20e3.  The proper CRC pre and post

          conditioning is used, meaning that the CRC register

          is pre-conditioned with all ones (a starting value

          of 0xffffffff) and the value is post-conditioned by

          taking the one's complement of the CRC residual.

          If bit 3 of the general purpose flag is set, this

          field is set to zero in the local header and the correct

          value is put in the data descriptor and in the central

          directory. If encrypting the central directory and general 

          purpose bit flag 13 is set indicating masking, the value 

          stored in the Local Header will be zero. 

      compressed size: (4 bytes)

      uncompressed size: (4 bytes)

          The size of the file compressed and uncompressed,

          respectively.  If bit 3 of the general purpose bit flag

          is set, these fields are set to zero in the local header

          and the correct values are put in the data descriptor and

          in the central directory.  If an archive is in zip64 format

          and the value in this field is 0xFFFFFFFF, the size will be

          in the corresponding 8 byte zip64 extended information 

          extra field.  If encrypting the central directory and general 

          purpose bit flag 13 is set indicating masking, the value stored 

          for the uncompressed size in the Local Header will be zero.