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

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

ZIP压缩文件数据结构解析十一



作者: 来源: 日期:2018/1/7 7:16:54 人气:5 

          3. A well-behaved PKZIP/OpenVMS program should never produce

             more than one sub-block with the same TagX value.  Also,

             there will never be more than one "extra" block of type

             0x000c in a particular directory record.

         -UNIX Extra Field (0x000d):

          The following is the layout of the Unix "extra" block.

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

          order.

          Value       Size          Description

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

  (UNIX)  0x000d      2 bytes       Tag for this "extra" block type

          TSize       2 bytes       Size for the following data block

          Atime       4 bytes       File last access time

          Mtime       4 bytes       File last modification time

          Uid         2 bytes       File user ID

          Gid         2 bytes       File group ID

          (var)       variable      Variable length data field

          The variable length data field will contain file type 

          specific data.  Currently the only values allowed are

          the original "linked to" file names for hard or symbolic 

          links, and the major and minor device node numbers for

          character and block device nodes.  Since device nodes

          cannot be either symbolic or hard links, only one set of

          variable length data is stored.  Link files will have the

          name of the original file stored.  This name is NOT NULL

          terminated.  Its size can be determined by checking TSize -

          12.  Device entries will have eight bytes stored as two 4

          byte entries (in little endian format).  The first entry

          will be the major device number, and the second the minor

          device number.

         -PATCH Descriptor Extra Field (0x000f):

          The following is the layout of the Patch Descriptor "extra"

          block.

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

          Value     Size     Description

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

  (Patch) 0x000f    2 bytes  Tag for this "extra" block type

          TSize     2 bytes  Size of the total "extra" block

          Version   2 bytes  Version of the descriptor

          Flags     4 bytes  Actions and reactions (see below) 

          OldSize   4 bytes  Size of the file about to be patched 

          OldCRC    4 bytes  32-bit CRC of the file to be patched 

          NewSize   4 bytes  Size of the resulting file 

          NewCRC    4 bytes  32-bit CRC of the resulting file 

          Actions and reactions

          Bits          Description

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

          0             Use for auto detection

          1             Treat as a self-patch

          2-3           RESERVED

          4-5           Action (see below)

          6-7           RESERVED

          8-9           Reaction (see below) to absent file 

          10-11         Reaction (see below) to newer file

          12-13         Reaction (see below) to unknown file

          14-15         RESERVED

          16-31         RESERVED