SectorMarker

Overview

SectorMarker is an IntEnum whose four members correspond to the reserved sentinel values defined in the Compound File Binary (CFB) specification for FAT and DIFAT sector chains. When iterating CFBReader.fat, each 32-bit entry is either a next-sector index or one of these marker values. Comparing against SectorMarker members rather than raw hex literals makes chain-walking code more readable and self-documenting.

from aspose.email_foss.cfb import CFBReader, SectorMarker

with CFBReader.from_file("archive.cfb") as reader:
    for i, entry in enumerate(reader.fat):
        if entry == int(SectorMarker.ENDOFCHAIN):
            print(f"FAT[{i}] = ENDOFCHAIN")

Values

ValueIntegerDescription
DIFSECT0xFFFFFFFCMarks a sector that belongs to the DIFAT chain rather than holding file data.
FATSECT0xFFFFFFFDMarks a sector that belongs to the FAT itself.
ENDOFCHAIN0xFFFFFFFEMarks the last sector in a chain; no further sectors follow.
FREESECT0xFFFFFFFFMarks an unallocated (free) sector available for future use.

See Also