Commit b9163a8
committed
Add splitfdstream crate for binary streaming format
Add a new crate implementing the splitfdstream binary format, which
enables streaming tar archives with external file references.
The format uses an 8-byte LE signed prefix followed by optional data:
- Negative prefix: inline data of size |prefix|
- Non-negative prefix: external file descriptor reference by index
Key types:
- SplitfdstreamWriter: Build splitfdstreams with inline/external chunks
- SplitfdstreamReader: Parse splitfdstreams back into chunks
- SplitfdstreamTarReader: Read adapter that reconstructs byte streams
This enables zero-copy tar reconstruction from containers-storage's
tar-split metadata by streaming headers inline while referencing
file content via fd.
Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>1 parent 984ce03 commit b9163a8
2 files changed
Lines changed: 1339 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments