Documentation

A File Can Be on Your Disk and Still Be Lost: Detecting Corruption

Silent corruption, checksums, format validation, and fixity audits, explained without jargon.

Preservation

Present isn’t intact

We picture data loss as a disappearance: the file is gone. The reality is more insidious. A file can stay present, the right size, with the right name, and be unreadable or silently altered. This is silent corruption: nothing warns you, until the day you open the image and it’s gray, truncated, or refuses to display. Understanding how this happens, and how to detect it, changes everything.

How a file degrades

The causes are mundane and frequent:

  • Bad sectors: a region of the disk ages and returns wrong bytes.
  • Incomplete transfer: an interrupted copy produces a file of plausible size but truncated.
  • Wrong extension: a file renamed .jpg that isn’t a JPEG, the system takes it at its word, the software that tries to open it won’t.
  • Truncated file: a write cut short (battery, crash) leaves a “finished” file that’s half-written.
  • Bit rot: over the very long term, media lose bits with no intervention.

None of these degradations show up in Finder: size and name lie.

The checksum: a fingerprint that betrays the slightest change

The countermeasure fits in one word: checksum. You compute a fingerprint, typically SHA-256, from the file’s content. It’s a digest of a few dozen characters, unique to the content. The principle: if a single byte changes, the fingerprint changes completely. By recomputing the fingerprint later and comparing it to the original, you know, with near-mathematical certainty, whether the file is still exactly the one you deposited.

Format validation: is the file what it claims to be?

The checksum tells you whether a file changed, not what it is. Format validation completes the picture: it checks the binary signature (the first bytes that identify a true JPEG, a true TIFF, a true RAW) and the consistency of the structure. It exposes the .jpg that isn’t one, the truncated file, or the format at risk of obsolescence.

The fixity audit: verifying over time

Checking once at deposit isn’t enough, since media degrade afterward. A fixity audit periodically recompares fingerprints and keeps a history of verifications. You no longer just say “it was healthy at archiving,” but “it’s still healthy today.” Weekly, monthly, or on demand depending on the stakes.

In practice

  • Trust neither name nor size: they prove nothing.
  • Attach a SHA-256 checksum to your important files at deposit.
  • Add format validation to catch fake files.
  • Schedule periodic checks rather than a one-time verification.

Obscura Flow records these fingerprints in a manifest, validates formats, and enables scheduled fixity audits in the Archive Center: silent corruption stops being a late discovery and becomes an early warning.