Skip to main content

Module archive

Module archive 

Source
Expand description

Shared vocabulary for the lazy archive indexes. Shared vocabulary for the lazy archive indexes.

ERF, RIM, and BIF indexes all face the same question: what should happen when an archive is damaged? The answer is graded by how much of the file is still trustworthy.

  • The table will not parse. Nothing about the archive is knowable, so indexing fails outright. Whatever is mounting it records that and moves on to the other sources it has.
  • The table parses but an entry points outside the file. Everything else in the archive is still readable, so the index keeps going and marks that one entry with an EntryDefect. Reading it returns the error; reading its neighbours works.
  • A read fails at read time. Already covered by the per-read Result.

The middle case is why this module exists. Tools that inspect installs and salvage damaged saves are most useful precisely when the data is broken, so refusing to open an archive over one bad entry disables them exactly when they are needed. Serving the healthy remainder is only safe because the defect is recorded rather than swallowed: a caller that wants strictness checks the defects and refuses on its own terms.

Enumsยง

EntryDefect
Why an indexed entry cannot be read.