- Bullet list: the font style can be followed by 1 and four bytes.
- InDesign 2.0: in-object strings start with 1, not 2.
- InDesign 2.0-5.0: XML tag names are a flag byte and a string, in
either byte order.
- InDesign 3.0 and 4.0: the document's hyperlink lists start at offset
0 and include page destinations.
- XMP: the packet can be shorter than its object; take its length.
- InDesign 1.x files (no signature, DOCUMENT at 0x5C) are reported as
not supported; files whose page directory lies beyond the database
pages as having no object database.
- Schema: leave out hyperlink sources that hold an anchored object, and
the characters U+FFFE and U+FFFF, which XML does not allow.
tests/corpus.rs accepts the two rejections above and skips the paths
listed in the local corpus/exclude.txt.
The byte order flag applies to object data only: database pages stay
little-endian. Object data is decoded in the file's byte order, and in
big-endian data the string tag and the flag byte before it are swapped.
The two big-endian samples are also the only files from before
InDesign 7.0, and some of their layouts differ: page transform and
bounds chunks, font records, XML tag names and nodes, story strands and
40-byte guide records are read; text frame settings, document
preferences, a composite font and a section style are left out with a
warning. The 40-byte guides of an InDesign 7.0 file are now read too.
docs/format/big-endian.md records the evidence. The corpus tests now
cover all byte orders.
Read the owned-items strand of stories and write anchored page items in
place of their U+FFFC character. Record that the third object tree lists
deleted UIDs, which no live hierarchy references.
The master page holds three tree roots and counts: objects, the class of
each UID, and UIDs without a class. Database::class_of returns an
object's class ID, and `indd objects` prints it.
Decode the database pages: page trailers and types, the logical page
table, the object B+ tree keyed by (UID, segment), data pages, slotted
pages and continued records. Database::object returns any object's byte
stream. Add `indd objects` and `indd object` commands.
Every object of all 351 little-endian corpus files reads without an
inconsistency. Big-endian databases report Unsupported for now.
Add a project CLAUDE.md with the clean-room rules.