FATR Chunk

See more on Chunks in general.

This is a “FAT Attributes”, actually FAT, FAT32, and NTFS style attribute bits.

FATR Chunk structure


a (correlated) Set.
b (subtype) Set.
r (range of instances) all used in the general manner.
p (multi-part) & c
y (payload specification)
i (instance sizes) Cleared.
n (pointer) Cleared.
FATR-nd has a distinct meaning, documented below.
d (redundant)

The y flag may be present. A FATR-r containing lots of identical instances may compress very well.


Set to 65.

Instance Number

The Instance Number matches the Instance Number of the DATA it applies to, as with any a-flagged chunk type.

FATR Chunk Payload

The Payload contains a 16-bit or 32-bit Big-Endian value that contains what the Win32 GetFileAttributes would report for the file on a Windows system. If 16-bit values are used, the high bits are assumed to be zero. This is the usual case, since no bits are defined in that range yet. All instances in the same FATR-r cluster must use the same size! 16-bit is normal; 32-bit is defined for future expansion.

The bit meanings are as follows:

valueWin32 nameinterpretation
0x00000001FILE_ATTRIBUTE_READONLYPrograms may not write to or delete a file, or delete a directory, without first clearing this attribute. This bit overrides the read-only common flag in the INDX. Windows systems only have one such bit rather than separate owner/group/all bits, so has a similar meaning to read-only for all on a UNIX permission mode.
0x00000002FILE_ATTRIBUTE_HIDDENThe Hidden and System bits don’t make the file or directory do anything special in Windows. The only thing they effect is that Hidden files are not returned from a directory listing unless asked for specifically. They are used in the GUI shell to a larger degree; it objects to deleting system files more strenuously, and uses the System flag on a directory to enable a customized file listing in the Explorer.
0x00000010FILE_ATTRIBUTE_DIRECTORYItem is a Directory rather than a file.
0x00000020FILE_ATTRIBUTE_ARCHIVEThe Archive bit is set automatically every time a file or directory is written to. This is used as a simple way to note which files need to be backed up, if you clear the Archive bit upon making a backup. Other than this convention, this flag means nothing to the Windows operating system.
0x00000040FILE_ATTRIBUTE_ENCRYPTEDWindows has encrypted file system support built-in to NTFS. Setting this attribute on a file residing on a supported volume will make the OS encrypt the file so it can be read only by the owner. For a directory, it flags that all files written-to within that directory will be encrypted by default.
0x00000080FILE_ATTRIBUTE_NORMAL Means that no other bits are set. For some reason, this is distinct from simply using zero.
0x00000100FILE_ATTRIBUTE_TEMPORARY Set for temporary files. Why would anyone restore a temporary file from an archive? Well, this doesn’t make the file automatically delete-on-close in Windows. Rather, the only thing it does in Windows is act as a hint to the way files are cached. It’s a good idea for applications to set the Temporary bit when making a temp file, but this bit does not enforce a particular usage or add any semantics of its own.
0x00000200FILE_ATTRIBUTE_SPARSE_FILE The file system is representing entire allocation units filled with zeros by not allocating any disk storage to it and remembering the gap by leaving it out of its logical-to-physical mapping system. An operating system or file system might be able to do this without having an explicit flag for the purpose. If restoring a file with this flag set, an application can take care to trigger this behavior e.g. look for long strings of zero bytes and seek past them rather than writing them.
0x00000400FILE_ATTRIBUTE_REPARSE_POINT In Windows NTFS, a Reparse Point is a generalization of a symbolic link. The item is not a file or a directory, but triggers code to jump to some other location in the OS’s name space. An implementation can probably ignore this flag when extracting a file from an archive, since any relevant information (e.g. is it s symbolic link) will be stored in a portable manner in the ZIP2 file.
0x00000800FILE_ATTRIBUTE_COMPRESSED In Windows, this means that the file system is compressing the file transparantly to any application. For a directory, it means that files created or written to within that directory will be compressed. When restoring such a file, the implementation should enable this kind of capability if supported by the platform.
0x00001000FILE_ATTRIBUTE_OFFLINE In Windows, this means that the file has been moved to a remote storage location. If restoring such a file, the implementation can tell a remote storage manager that this file should migrate out of primary storage.
In Windows, a content indexing service indexes files for fast searches. If this flag is set, the indexing service (deamon) will skip it. When restoring a file with this flag set, an implementation on a platform with some similar feature can use it as such.

Usage Notes


FATR-nd Chunk

A portion number, as with DATA.

Valid HTML 4.01!

Page content copyright 2003 by John M. Dlugosz. Home:http://www.dlugosz.com, email:mailto:john@dlugosz.com