Skip to content

cupertino-files / writeIndexSet

Function: writeIndexSet()

writeIndexSet(indexes): RawMessage

Defined in: src/tst/categories.ts:480

Build a TSCE.IndexSetArchive from indexes — the inverse of expandIndexSet.

Consecutive indexes collapse into one range, and a range covering a single index is written with range_begin alone. Both match what Apple writes: a root node covering rows 1–30 stores one entry with an end, and a group holding seven scattered rows stores seven entries without one. Getting that detail wrong would still read back correctly, and would stop a regrouped archive being byte-identical to the app's.

Parameters

indexes

readonly number[]

Returns

RawMessage

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.