Expand description
Packfile management for efficient storage.
Packfiles bundle multiple objects together with delta compression, achieving 50-70% space savings for repositories with many similar objects.
Structs§
- Cancellation
Token - Cooperative cancellation shared by a caller and a repack operation.
- Encoded
Pack Subset - Pack
Builder - Pack builder for creating packfiles.
- Pack
Container Spec - Pack
Entry Header - Pack
Index - Pack index for fast object lookup.
- Pack
Logical Id - Root-spool-scoped identity of the logical objects in a pack.
- Pack
Manager - Format-only coordinator for loaded pack and index files.
- Pack
Object Record - Pack
Reader - Pack
Representation Hash - Hash of one finalized physical pack representation.
- Pack
Stats - Pack statistics.
- Repack
Context - Cooperative controls supplied to a storage-specific operation.
- Repack
Handle - Handle for cancellation and result collection.
- Repack
Inventory - Cheap storage facts used to decide whether a repack is worthwhile.
- Repack
Outcome - Storage-produced measurements, excluding scheduler-owned duration/reason.
- Repack
Policy - Configurable automatic repack thresholds.
- Repack
Report - Completed operation measurements.
- Repack
Resource Limits - Scheduler-wide resource limits.
- Repack
Scheduler - Bounded background scheduler shared by native and hosted repack payloads.
- Streaming
Pack Builder - Streaming pack builder. Held generic over the pack writer (
Filein production,Cursor<Vec<u8>>in tests). - Visible
Source Closure - Verified visible closure. Partial trees retain their original Merkle root and must be installed in the partial-tree cache, never the full tree store.
Enums§
- Object
Type - Object type for pack entries.
- Pack
Object Id - Pack
Read Tier - Physical read tier for an indexed pack object.
- Repack
Error - Error returned by scheduling or executing a repack.
- Repack
Reason - The policy signal that caused a background repack.
- Repack
Schedule - Result of asking the scheduler to start work.
Constants§
- PACK_
CHECKSUM_ LEN - PACK_
LOGICAL_ ID_ CONTEXT - BLAKE3 derive-key context for the canonical logical pack inventory.
Traits§
- Load
Monitor - Host-load signal consulted at cooperative checkpoints.
- Repack
Operation - Storage-specific repack payload driven by the scheduler.
- Sync
Data - Fsync staged pack bytes after finalize flush (Wave 5 L7).
Functions§
- append_
container_ checksum - build_
source_ pack - Build an exact selected-source pack without consulting State history, provenance, attachments, or linked spools. Full canonical trees keep private delta bases out of the pack. The caller owns revision authorization and the temporary output directory; discard that directory on failure.
- build_
source_ pack_ with_ references - build_
visible_ source_ pack - Build only source bytes visible under an already-admitted entry projection. Hidden directories are not traversed; their salted commitments prove the original tree root without names or targets. Reference descriptor closures are included only when no selected entry is hidden. The final boolean is true when the selected source and reference closure is complete.
- compress_
compact_ frame - Compress one compact metadata frame with the measured lineage-solid policy.
- compress_
pack_ payload - decode_
tagged_ entry_ header - decompress_
pack_ payload - encode_
tagged_ entry - encode_
tagged_ entry_ parts - has_
zstd_ magic - try_
decode_ tagged_ entry_ header - verify_
container - verify_
container_ layout - write_
container_ header
Type Aliases§
- Retained
Pack Build - Pack bytes, index bytes, statistics, and the original uncompressed inputs.