Expand description
The shared shrink primitive: lossy-but-restorable, owned here and nowhere else. Four invariants, each enforced in code: store-before-cut; substitute (hint included) never larger than the original nor the cap; only lossy transforms store; the substitute always carries a materialized read-only rest path. CAS dedup makes repeated offloads of the same bytes idempotent.
Structs§
- Offload
Record - The outcome: a substitute that fits the cap, the original pinned in CAS, and a read-only path the model can keep reading from.
- Offload
Site - Where offloaded bytes live: the CAS for the original, and the room
whose
REST_DIRholds the materialized rest file. The room travels as its city address because the model’s read tool resolves every path from the city root.originis the run and building the original is pinned for, so that acas:read of it is judged where the output was made.
Constants§
- REST_
DIR - The directory inside the room that holds materialized rest files.
Functions§
- offload
- Shrinks
bytesto at mostcap_bytes. Callers only come here for lossy cases (len > cap); a lossless call is refused — invariant 3 says only lossy transforms may store. - rematerialize
- Restores the rest file from the CAS after external cleanup; the bytes are the original, verbatim (A7’s third assertion).