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

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

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



作者: 来源: 日期:2018/1/7 7:14:40 人气:6 

          Detailed descriptions of Extra Fields defined by third 

          party mappings will be documented as information on

          these data structures is made available to PKWARE.  

          PKWARE does not guarantee the accuracy of any published

          third party data.

          The Data Size field indicates the size of the following

          data block. Programs can use this value to skip to the

          next header block, passing over any data blocks that are

          not of interest.

          Note: As stated above, the size of the entire .ZIP file

                header, including the file name, comment, and extra

                field should not exceed 64K in size.

          In case two different programs should appropriate the same

          Header ID value, it is strongly recommended that each

          program place a unique signature of at least two bytes in

          size (and preferably 4 bytes or bigger) at the start of

          each data area.  Every program should verify that its

          unique signature is present, in addition to the Header ID

          value being correct, before assuming that it is a block of

          known type.

         -ZIP64 Extended Information Extra Field (0x0001):

          The following is the layout of the ZIP64 extended 

          information "extra" block. If one of the size or

          offset fields in the Local or Central directory

          record is too small to hold the required data,

          a ZIP64 extended information record is created.

          The order of the fields in the ZIP64 extended 

          information record is fixed, but the fields will

          only appear if the corresponding Local or Central

          directory record field is set to 0xFFFF or 0xFFFFFFFF.

          Note: all fields stored in Intel low-byte/high-byte order.

          Value      Size       Description

          -----      ----       -----------

  (ZIP64) 0x0001     2 bytes    Tag for this "extra" block type

          Size       2 bytes    Size of this "extra" block

          Original 

          Size       8 bytes    Original uncompressed file size

          Compressed

          Size       8 bytes    Size of compressed data

          Relative Header

          Offset     8 bytes    Offset of local header record

          Disk Start

          Number     4 bytes    Number of the disk on which

                                this file starts 

          This entry in the Local header must include BOTH original

          and compressed file sizes.

         -OS/2 Extra Field (0x0009):

          The following is the layout of the OS/2 attributes "extra" 

          block.  (Last Revision  09/05/95)

          Note: all fields stored in Intel low-byte/high-byte order.

          Value       Size          Description

          -----       ----          -----------

  (OS/2)  0x0009      2 bytes       Tag for this "extra" block type

          TSize       2 bytes       Size for the following data block

          BSize       4 bytes       Uncompressed Block Size

          CType       2 bytes       Compression type

          EACRC       4 bytes       CRC value for uncompress block

          (var)       variable      Compressed block