No description
- C++ 96.1%
- Shell 3.3%
- Makefile 0.6%
Implements the object segment layout from FORMAT.md \u00a710: a payload region of concatenated, OID-sorted object bytes, followed by \u00a710.2 locator leaves (greedy-packed up to 85 records each), a \u00a76 root Index block, and the \u00a77 footer with OBJECT_SEGMENT (\u00a78 bit 5) set and object_index_offset pointing at the root. - include/vcs/object_segment.hpp (new): ObjectSegmentWriter with add(oid, bytes) / finish(nanos); free function read_object_from_segment(seg, oid) returning a span into seg.file. - src/format/object_segment.cpp (new): writer sorts at finish(), rejects conflicting duplicate adds (RECOVERY.md \u00a7D3), returns ObjectTooLarge for payloads above 2\u2074\u2070 (FORMAT.md \u00a710.1), InvalidArgument when no objects were added, SegmentIndexOverflow when the root would spill (FORMAT.md \u00a76 rule applied per \u00a710.2). Reader verifies OBJECT_SEGMENT is set, binary-searches the root to pick one leaf, then delegates to find_in_object_locator_leaf. CRC verified on every index block touched. - test/test_segment.cpp: 8 object_segment.* tests: empty rejection, single round trip, multi-leaf spill (300 objects), absent lookups, conflicting-vs-idempotent duplicate add, unsupported-on-ref-segment, determinism. 262/262 tests pass (+8). |
||
|---|---|---|
| bench | ||
| CORPUS | ||
| include/vcs | ||
| src | ||
| test | ||
| third_party/blake3 | ||
| .gitignore | ||
| AGENTS.md | ||
| COMPACTION.md | ||
| FORMAT.md | ||
| Makefile | ||
| RECOVERY.md | ||
| SPEC.md | ||
| TESTING.md | ||