Container parsing and lossless decomposition.
The central idea: any image file can be described as an ordered list of byte
[Segment]s covering it completely and without overlap. Most segments are
[SegmentKind::Verbatim] — headers, IFDs, metadata, previews — and are stored as-is
because they are small and not worth modelling. One or more segments are
[SegmentKind::Image], holding raw pixel or sensor data, and those are worth handing
to a real image codec.
Reassembling the segments in src_offset order must reproduce the original file
byte for byte. That property is the entire contract, and it is what makes archival
safe: we never need to understand a file completely, only the parts we choose to
recompress.