#[non_exhaustive]pub enum XrefEntry {
InUse {
offset: u64,
generation: u16,
},
Free {
next_free: u32,
generation: u16,
},
InStream {
stream_num: u32,
index: u32,
},
}Expand description
One cross-reference entry: §7.5.4’s classic n/f types plus
§7.5.8.3 Table 18’s type-2 compressed-object entry.
#[non_exhaustive]: §7.5.8.3 explicitly reserves further entry
types (“any other value shall be interpreted as a reference to the
null object, thus permitting new entry types to be defined in the
future”), so downstream matches must stay open.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InUse
Classic type n / stream type 1: the object lives at
offset (from the beginning of the file) with generation
generation.
Fields
Free
Classic type f / stream type 0: the object number is free.
Kept (not dropped!) — free-with-generation-65535 entries are how
hybrid files hide objects, and a free entry shadows an older
in-use entry during the first-wins merge (deletion via
incremental update).
Fields
InStream
Stream type 2 (§7.5.8.3 Table 18): the object is compressed inside an object stream (§7.5.7).
Note what this variant deliberately does not carry: a generation. A type-2 entry has no generation field at all — its field 3 is the index within the container — because §7.3.10/ §7.5.7 fix the generation of every compressed object, and of the container itself, at 0. Storing a generation here would invent information the file does not contain.