Expand description
Pack file support for the content-addressed store.
Pack files bundle multiple blobs into a single file, reducing filesystem overhead for repositories with many small objects.
§Pack Format (v1)
.pack file:
"SPCK" magic
u32 LE version (1)
u32 LE object count
per object:
u8 object type (1 = blob)
u32 LE uncompressed length
u32 LE compressed length
[32] BLAKE3 digest
[compressed length] Zstd frame
.idx file:
"SIDX" magic
u32 LE version (1)
u32 LE entry count
per entry:
[32] BLAKE3 digest
u64 LE offset into the .pack fileThe index is sorted by digest on load so lookups binary-search.
Structs§
- Pack
Cache - Cache of loaded pack indices for efficient lookup.
- Pack
File - Writer/reader for
.packfiles. - Pack
Index - A parsed, sorted
.idxfile.
Enums§
- Pack
Error - Errors that can occur while reading or writing pack files.