Trust
What if a pack is damaged?
It stays closed. A program that finds a problem refuses the whole pack and says what went wrong.
What gets checked
Before it opens a pack, a program runs a fixed list of checks in a fixed order. It stops at the first one that fails.
- Is the file long enough to be a pack?
- Is the cover line written the right way?
- Is the end of the pack in the right shape?
- Do the cover line and the end of the pack agree?
- Is each part where the end of the pack says it is?
- Does the seal match what is inside?
- Can every line be read?
- Is the number of lines right?
Two more checks look at the finder and at the cards that point to stored numbers. Opening a pack runs the first eight; a full check runs all ten.
Each failed check has its own name. So every program that follows the rules gives the same reason for the same broken file.
Why staying closed is safe
A program that follows the rules opens nothing from a damaged pack. Nobody reads a broken copy as if it were whole.
Damage and changes look the same
The seal cannot tell a slip during copying from a deliberate edit. Either way, the code no longer matches.
The cure is the same too: a fresh copy from wherever the pack came from.
Checking is on by default
A program skips the check only when it is told to.