1 Commits
Author SHA1 Message Date
Eremey Valetov 0a2fb66793 cli: --ingest writes a real UC2 archive
uc2 --ingest now defaults to a real UC2 archive instead of the custom
UC2INGST blob.  The stream is split into content-defined chunks, unique
chunks are stored once as NoMaster-compressed blocks, and the central
directory carries one part-N file entry per chunk occurrence in stream
order (repeats share a stored block, so the payload is deduplicated).
uc2 -l lists it and uc2 -x extracts it like any archive.

uc2 --ingest-restore reassembles the stream by walking the entries in
order through the reader and concatenating them; v1/v2 archives are
still restored via magic auto-detection.  The writer and reader-based
restore live in the CLI on top of the public compress/reader API; the
libuc2 v1/v2 primitive is unchanged.

New cli_ingest test covers dedup, byte-exact round-trip, extract-and-
concatenate, and the empty stream.  Size math uses size_t throughout to
avoid wrapping on multi-gigabyte inputs.

Closes: 59bec0d
2026-07-12 17:05:03 -04:00