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

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

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



作者: 来源: 日期:2018/1/7 7:12:17 人气:6 

      file name length: (2 bytes)

      extra field length: (2 bytes)

      file comment length: (2 bytes)

          The length of the file name, extra field, and comment

          fields respectively.  The combined length of any

          directory record and these three fields should not

          generally exceed 65,535 bytes.  If input came from standard

          input, the file name length is set to zero.  

      disk number start: (2 bytes)

          The number of the disk on which this file begins.  If an 

          archive is in zip64 format and the value in this field is 

          0xFFFF, the size will be in the corresponding 4 byte zip64 

          extended information extra field.

      internal file attributes: (2 bytes)

          Bits 1 and 2 are reserved for use by PKWARE.

          The lowest bit of this field indicates, if set, that

          the file is apparently an ASCII or text file.  If not

          set, that the file apparently contains binary data.

          The remaining bits are unused in version 1.0.

          The 0x0002 bit of this field indicates, if set, that a 

          4 byte variable record length control field precedes each 

          logical record indicating the length of the record. This 

          flag is independent of text control characters, and if used 

          in conjunction with text data, includes any control 

          characters in the total length of the record. This value is 

          provided for mainframe data transfer support.

      external file attributes: (4 bytes)

          The mapping of the external attributes is

          host-system dependent (see 'version made by').  For

          MS-DOS, the low order byte is the MS-DOS directory

          attribute byte.  If input came from standard input, this

          field is set to zero.

      relative offset of local header: (4 bytes)

          This is the offset from the start of the first disk on

          which this file appears, to where the local header should

          be found.  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.

      file name: (Variable)

          The name of the file, with optional relative path.

          The path stored should not contain a drive or

          device letter, or a leading slash.  All slashes

          should be forward slashes '/' as opposed to

          backwards slashes '\' for compatibility with Amiga

          and Unix file systems etc.  If input came from standard

          input, there is no file name field.  If encrypting

          the central directory and general purpose bit flag 13 is set 

          indicating masking, the file name stored in the Local Header 

          will not be the actual file name.  A masking value consisting 

          of a unique hexadecimal value will be stored.  This value will 

          be sequentially incremented for each file in the archive. See

          the section on the Strong Encryption Specification for details 

          on retrieving the encrypted file name. 

      extra field: (Variable)

          This is for expansion.  If additional information

          needs to be stored for special needs or for specific 

          platforms, it should be stored here.  Earlier versions