📄 extra.fld
字号:
or no timestamp at all. TSize is used to flag its presence or absence. But note: If "Flags" indicates that Modtime is present in the local header field, it MUST be present in the central header field, too! This correspondence is required because the modification time value may be used to support trans-timezone freshening and updating operations with zip archives. The time values are in standard Unix signed-long format, indicating the number of seconds since 1 January 1970 00:00:00. The times are relative to Coordinated Universal Time (UTC), also sometimes referred to as Greenwich Mean Time (GMT). To convert to local time, the software must know the local timezone offset from UTC/GMT. The lower three bits of Flags in both headers indicate which time- stamps are present in the LOCAL extra field: bit 0 if set, modification time is present bit 1 if set, access time is present bit 2 if set, creation time is present bits 3-7 reserved for additional timestamps; not set Those times that are present will appear in the order indicated, but any combination of times may be omitted. (Creation time may be present without access time, for example.) TSize should equal (1 + 4*(number of set bits in Flags)), as the block is currently defined. Other timestamps may be added in the future. -Info-ZIP Unix Extra Field (type 1): ================================== The following is the layout of the old Info-ZIP extra block for Unix. It has been replaced by the extended-timestamp extra block (0x5455) and the Unix type 2 extra block (0x7855). (Last Revision 19970118) Local-header version: Value Size Description ----- ---- ----------- (Unix1) 0x5855 Short tag for this extra block type TSize Short total data size for this block AcTime Long time of last access (UTC/GMT) ModTime Long time of last modification (UTC/GMT) UID Short Unix user ID GID Short Unix group ID Central-header version: Value Size Description ----- ---- ----------- (Unix1) 0x5855 Short tag for this extra block type TSize Short total data size for this block AcTime Long time of last access (GMT/UTC) ModTime Long time of last modification (GMT/UTC) The file access and modification times are in standard Unix signed- long format, indicating the number of seconds since 1 January 1970 00:00:00. The times are relative to Coordinated Universal Time (UTC), also sometimes referred to as Greenwich Mean Time (GMT). To convert to local time, the software must know the local timezone offset from UTC/GMT. The modification time may be used by non-Unix systems to support inter-timezone freshening and updating of zip archives. The local-header extra block may optionally contain UID and GID info for the file. The local-header TSize value is the only indication of this. Note that Unix UIDs and GIDs are usually specific to a particular machine, and they generally require root access to restore. This extra field type is obsolete, but it has been in use since mid-1994. Therefore future archiving software should continue to support it. Some guidelines: An archive member should either contain the old "Unix1" extra field block or the new extra field types "time" and/or "Unix2". If both the old "Unix1" block type and one or both of the new block types "time" and "Unix2" are found, the "Unix1" block should be considered invalid and ignored. Unarchiving software should recognize both old and new extra field block types, but the info from new types overrides the old "Unix1" field. Archiving software should recognize "Unix1" extra fields for timestamp comparison but never create it for updated, freshened or new archive members. When copying existing members to a new archive, any "Unix1" extra field blocks should be converted to the new "time" and/or "Unix2" types. -Info-ZIP Unix Extra Field (type 2): ================================== The following is the layout of the new Info-ZIP extra block for Unix. (Last Revision 19960922) Local-header version: Value Size Description ----- ---- ----------- (Unix2) 0x7855 Short tag for this extra block type TSize Short total data size for this block UID Short Unix user ID GID Short Unix group ID Central-header version: Value Size Description ----- ---- ----------- (Unix2) 0x7855 Short tag for this extra block type TSize Short total data size for this block The data size of the central-header version is zero; it is used solely as a flag that UID/GID info is present in the local-header extra field. If additional fields are ever added to the local version, the central version may be extended to indicate this. Note that Unix UIDs and GIDs are usually specific to a particular machine, and they generally require root access to restore. -ASi Unix Extra Field: ==================== The following is the layout of the ASi extra block for Unix. The local-header and central-header versions are identical. (Last Revision 19960916) Value Size Description ----- ---- ----------- (Unix3) 0x756e Short tag for this extra block type TSize Short total data size for this block CRC Long CRC-32 of the remaining data Mode Short file permissions SizDev Long symlink'd size OR major/minor dev num UID Short user ID GID Short group ID (var.) variable symbolic link filename Mode is the standard Unix st_mode field from struct stat, containing user/group/other permissions, setuid/setgid and symlink info, etc. If Mode indicates that this file is a symbolic link, SizDev is the size of the file to which the link points. Otherwise, if the file is a device, SizDev contains the standard Unix st_rdev field from struct stat (includes the major and minor numbers of the device). SizDev is undefined in other cases. If Mode indicates that the file is a symbolic link, the final field will be the name of the file to which the link points. The file- name length can be inferred from TSize. [Note that TSize may incorrectly refer to the data size not counting the CRC; i.e., it may be four bytes too small.] -BeOS Extra Field: ================ The following is the layout of the file-attributes extra block for BeOS. (Last Revision 19970531) Local-header version: Value Size Description ----- ---- ----------- (BeOS) 0x6542 Short tag for this extra block type TSize Short total data size for this block BSize Long uncompressed file attribute data size Flags Byte info bits (CType) Short compression type (CRC) Long CRC value for uncompressed file attribs Attribs variable file attribute data Central-header version: Value Size Description ----- ---- ----------- (BeOS) 0x6542 Short tag for this extra block type TSize Short total data size for this block BSize Long size of uncompressed local EF block data Flags Byte info bits The least significant bit of Flags in both headers indicates whether the LOCAL extra field is uncompressed (and therefore whether CType and CRC are omitted): bit 0 if set, Attribs is uncompressed (no CType, CRC) bits 1-7 reserved; if set, assume error or unknown data Currently the only supported compression types are deflated (type 8) and stored (type 0); the latter is not used by Info-ZIP's Zip but is supported by UnZip. Attribs is a BeOS-specific block of data in big-endian format with the following structure (if compressed, uncompress it first): Value Size Description ----- ---- ----------- Name variable attribute name (null-terminated string) Type Long attribute type (32-bit unsigned integer) Size Long Long data size for this sub-block (64 bits) Data variable attribute data The attribute structure is repeated for every attribute. The Data field may contain anything--text, flags, bitmaps, etc. -SMS/QDOS Extra Field: ==================== The following is the layout of the file-attributes extra block for SMS/QDOS. The local-header and central-header versions are identical. (Last Revision 19960929) Value Size Description ----- ---- ----------- (QDOS) 0xfb4a Short tag for this extra block type TSize Short total data size for this block LongID Long extra-field signature (ExtraID) Long additional signature/flag bytes QDirect 64 bytes qdirect structure LongID may be "QZHD" or "QDOS". In the latter case, ExtraID will be present. Its first three bytes are "02\0"; the last byte is currently undefined. QDirect contains the file's uncompressed directory info (qdirect struct). Its elements are in native (big-endian) format: d_length beLong file length d_access byte file access type d_type byte file type d_datalen beLong data length d_reserved beLong unused d_szname beShort size of filename d_name 36 bytes filename d_update beLong time of last update d_refdate beLong file version number d_backup beLong time of last backup (archive date) -AOS/VS Extra Field: ================== The following is the layout of the extra block for Data General AOS/VS. The local-header and central-header versions are identical. (Last Revision 19961125) Value Size Description ----- ---- ----------- (AOSVS) 0x5356 Short tag for this extra block type TSize Short total data size for this block "FCI\0" Long extra-field signature Version Byte version of AOS/VS extra block (10 = 1.0) Fstat variable fstat packet AclBuf variable raw ACL data ($MXACL bytes) Fstat contains the file's uncompressed fstat packet, which is one of the following: normal fstat packet (P_FSTAT struct) DIR/CPD fstat packet (P_FSTAT_DIR struct) unit (device) fstat packet (P_FSTAT_UNIT struct) IPC file fstat packet (P_FSTAT_IPC struct) AclBuf contains the raw ACL data; its length is $MXACL. -FWKCS MD5 Extra Field: ===================== The following is the layout of the optional extra block used by the FWKCS utility. There is no local-header version; the following applies only to the central header. (Last Revision 19961207) Central-header version: Value Size Description ----- ---- ----------- (MD5) 0x4b46 Short tag for this extra block type TSize Short total data size for this block (19) "MD5" 3 bytes extra-field signature MD5hash 16 bytes 128-bit MD5 hash of uncompressed data The MD5 hash in this extra block is used to automatically identify files independent of their filenames; it is an an enhanced contents- signature. FWKCS provides an option to strip this extra field, if present, from a zipfile central directory. In adding this extra field, FWKCS preserves Zipfile Authenticity Verification; if stripping this extra field, FWKCS preserves all versions of AV through PKZIP version 2.04g. ``The MD5 algorithm is being placed in the public domain for review and possible adoption as a standard.'' (Ron Rivest, MIT Laboratory for Computer Science and RSA Data Security, Inc., April 1992, RFC 1321, 11.76-77). FWKCS, and FWKCS Contents_Signature System, are trademarks of Frederick W. Kantor.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -