Skip to main content

Module pack

Module pack 

Source
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§

CancellationToken
Cooperative cancellation shared by a caller and a repack operation.
EncodedPackSubset
PackBuilder
Pack builder for creating packfiles.
PackContainerSpec
PackEntryHeader
PackIndex
Pack index for fast object lookup.
PackLogicalId
Root-spool-scoped identity of the logical objects in a pack.
PackManager
Format-only coordinator for loaded pack and index files.
PackObjectRecord
PackReader
PackRepresentationHash
Hash of one finalized physical pack representation.
PackStats
Pack statistics.
RepackContext
Cooperative controls supplied to a storage-specific operation.
RepackHandle
Handle for cancellation and result collection.
RepackInventory
Cheap storage facts used to decide whether a repack is worthwhile.
RepackOutcome
Storage-produced measurements, excluding scheduler-owned duration/reason.
RepackPolicy
Configurable automatic repack thresholds.
RepackReport
Completed operation measurements.
RepackResourceLimits
Scheduler-wide resource limits.
RepackScheduler
Bounded background scheduler shared by native and hosted repack payloads.
StreamingPackBuilder
Streaming pack builder. Held generic over the pack writer (File in production, Cursor<Vec<u8>> in tests).
VisibleSourceClosure
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§

ObjectType
Object type for pack entries.
PackObjectId
PackReadTier
Physical read tier for an indexed pack object.
RepackError
Error returned by scheduling or executing a repack.
RepackReason
The policy signal that caused a background repack.
RepackSchedule
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§

LoadMonitor
Host-load signal consulted at cooperative checkpoints.
RepackOperation
Storage-specific repack payload driven by the scheduler.
SyncData
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§

RetainedPackBuild
Pack bytes, index bytes, statistics, and the original uncompressed inputs.