pub struct RegionDeltaSplitter {
pub chunk_size: usize,
}Expand description
The splitter the per-entry seam could not have: one file, part chunk and part delta.
Both the base and the target are tiled at chunk_size. For each tile:
- bytes identical to the base’s tile at the same offset → a delta unit, which for an unchanged region is a single COPY instruction of a few bytes whatever the tile’s size;
- anything else → an ordinary byte unit.
So a large file with one edited region stores the edited region in full and
everything else as ~6 bytes per tile, and EntryReader had no way to say
that: its choice was per entry, so the whole file went one way or the other.
§What it costs, said plainly
Every delta unit names the same base, and reconstruction resolves that base
once — see the memo in Entry::reconstruct. Without that memo this
shape would be quadratic in the number of unchanged tiles, which is the one
new cost moving the seam introduces and the reason the memo is not optional.
A tile that differs is stored whole rather than delta’d against its counterpart. That is the conservative choice: a per-tile delta would need its own base-size bookkeeping for no saving on the case this exists for.
Fields§
§chunk_size: usize