2.6.3 Other Directory Entries

Directory entries other than the root storage directory entry are marked as either stream objects, storage objects, or unallocated objects.

The CLSID, state bits, creation time, modified time, and Child ID values are meaningful in directory entries for storage objects but not for Stream objects.

The Starting Sector Location and Stream Size values are meaningful in directory entries for stream objects but not for storage objects.

To determine the file location of actual stream data from a stream directory entry, it is necessary to determine whether the stream exists as normal sectors allocated in the FAT or as mini sectors (from the mini stream) allocated in the mini FAT. Streams whose size is less than the Mini Stream Cutoff Size value (typically 4,096 bytes) for the file exist in the mini stream. The Starting Sector Location is used as an index into the mini FAT (which starts at mini FAT Starting Location) to track the chain of sectors through the mini stream. Streams whose size is greater than or equal to the Mini Stream Cutoff Size value for the file exist as standard streams. Their Starting Sector Location value is used as an index into the standard FAT, which describes the chain of full sectors containing their data.

For 512-byte sectors, the Stream Size upper 32-bits field MUST be set to zero when the compound file is written. However, the high DWORD of this field was not initialized in older implementations, so current implementations MUST accept uninitialized high DWORD for the Stream Size field. For version 4 compound files that support a 4,096-byte sector size, the Stream Size must be a full 64-bit integer stream size.

Free (unused) directory entries are marked with Object Type 0x0 (unknown or unallocated). The entire directory entry must consist of all zeroes except for the child, right sibling, and left sibling pointers, which must be initialized to NOSTREAM (0xFFFFFFFF).