Skip to main content

Crate sley_pack

Crate sley_pack 

Source

Modules§

inflate
Bounded inflate allocation helpers for untrusted compressed input.

Structs§

BoundedPackDecoder
A targeted decoder tied to one or more registered pack sources.
EwahBitmap
FixThinPackBuild
A self-contained pack and the v2 index built for its final bytes.
MultiPackBitmapPack
MultiPackIndex
MultiPackIndexChunk
MultiPackIndexEntry
MultiPackIndexOidLookup
PackAllocationError
A body allocation failed after every configured decoder limit had passed.
PackBitmapEntry
PackBitmapIndex
PackBitmapPseudoMerge
PackBitmapTypeBitmaps
PackBitmapWriter
Builder that assembles a reachability bitmap (.bitmap) for a pack.
PackEntry
PackFile
PackIndex
PackIndexBuild
PackIndexEntry
PackIndexLookup
PackIndexView
PackIndexViewData
PackIndexedObject
PackInput
PackLimitError
Deterministic details for a rejected limit check.
PackMtimes
PackObject
PackObjectLocation
A stable entry location within a registered pack source.
PackReadLimits
Hard limits applied while reading packs.
PackReadOutcome
One decoded object and the resources measured while producing it.
PackReadStats
Usage measured for one targeted read.
PackReadStream
A pack-byte reader configured for a known length or trailer-delimited input.
PackReverseIndex
PackSourceId
Opaque identifier for one source registered with a BoundedPackDecoder.
PackStreamIndexBuild
PackStreamProgress
Streaming pack-receive counters emitted while index_pack_from_stream parses a pack off a reader. All fields are monotonically non-decreasing within one indexing pass.
PackVerifyStat
Per-object statistics for one entry of a verified pack, in the shape git verify-pack -v reports.
PackVerifyStats
Result of PackFile::verify_pack_stats: per-object stats in pack offset order plus the pack’s trailing checksum.
PackWrite
PackWriteOptions
Options controlling sliding-window delta selection during pack generation.
PackWriteSummary
RefDeltaBases
Precomputed REF-base lookup used during one or more targeted reads.
RepackPolicy
ResolvedPackObject
Immutable, identity-bound materialization accepted as a non-pack REF base.
SlicePackSource
A borrowed in-memory source, useful for parity tests and already-bounded pack buffers. The decoder borrows the slice for its entire lifetime.

Enums§

PackLimitKind
Which explicit decoder limit rejected a read.
PackReadError
Error returned by bounded targeted decoding.

Constants§

DEFAULT_PACK_DEPTH
Default maximum delta chain depth used by PackFile::write_packed.
DEFAULT_PACK_WINDOW
Default sliding-window size used by PackFile::write_packed.
MAX_READ_DELTA_CHAIN_DEPTH
Default maximum delta chain depth accepted when reading a pack (sley#5).
PACK_OBJECT_COUNT_PREALLOC_CAP
Upper bound on the speculative Vec::with_capacity taken from a declared object count when the total pack length is not known up front (the streaming indexer reads the header before it has seen the body).

Traits§

HeaderTypeCache
Memo of pack offset -> resolved header (end-of-chain type, result size) for the cat-file --batch-check header fast path.
PackDeltaCache
A cache of objects already decoded from one specific pack, keyed by the in-pack byte offset at which each object’s entry begins.
PackIndexByteSource
PackReadSource
A source that can read pack bytes positionally without changing shared cursor state or requiring the complete pack to be resident in memory.

Functions§

fix_thin_pack
Complete a thin pack by appending every external ref-delta base it needs.
fix_thin_pack_with_limits
fix_thin_pack with explicit pack parsing and delta-depth limits.
index_pack_from_reader
Validate and index a seekable pack stream without writing into a repository.
index_pack_from_reader_to_trailer
Validate and index one pack from a stream, stopping after its trailer.
index_pack_from_reader_to_trailer_with_base
index_pack_from_reader_to_trailer with an external ref-delta resolver.
index_pack_from_reader_to_trailer_with_base_and_limits
index_pack_from_reader_to_trailer_with_limits
index_pack_from_reader_to_trailer_with_progress
Index one non-seekable pack through its trailer and report receive progress.
index_pack_from_reader_to_trailer_with_progress_and_limits
index_pack_from_reader_with_base
index_pack_from_reader with an external ref-delta base resolver.
index_pack_from_reader_with_base_and_limits
index_pack_from_reader_with_limits
index_pack_from_stream
Index a prepared PackReadStream without progress callbacks.
index_pack_from_stream_with_base
index_pack_from_stream with an external ref-delta base resolver.
index_pack_from_stream_with_base_and_limits
index_pack_from_stream_with_limits
index_pack_from_stream_with_progress
Index a prepared PackReadStream and report receive progress.
index_pack_from_stream_with_progress_and_limits
pack_order_index_positions
The .rev table for a pack: index positions (the rank of each object in the oid-sorted .idx) listed in pack order (ascending pack offset), as upstream write_rev_file lays them out. Accepts entries in any order; the result feeds PackReverseIndex::write.
read_object_at_arc
Decode the single object stored at byte offset within pack_bytes, reading only that object and its delta-base chain instead of parsing the whole pack.
read_object_at_with_cache_and_ofs_base_arc
Like read_object_at_with_cache_arc, but lets an object-database caller recover an ofs-delta base from another storage copy when the in-pack base offset cannot be decoded. Direct pack verification should keep using the strict APIs; this hook mirrors normal object lookup, where a corrupt packed copy does not hide a good loose or redundant packed copy.
read_object_at_with_cache_arc
Like read_object_at_arc, but reuses already-decoded objects from cache (keyed by in-pack offset) and records every object it decodes.
read_object_at_with_ofs_base_arc
Like read_object_at_with_cache_and_ofs_base_arc, without an offset-cache.
read_object_header_at
The object type and final (inflated) size of the entry at offset, without materializing the object body — git’s cat-file --batch-check fast path.
read_object_header_at_with_cache
Like read_object_header_at but threads a caller-owned HeaderTypeCache through the read so (a) the ofs-delta chain’s end-of-chain type is resolved at most once per chain and (b) a repeated lookup of the same offset returns from the memo without re-inflating (sley#26). The cache is keyed by in-pack offset, so it must be scoped to a single pack’s bytes by the caller.
write_bitmap
Convenience wrapper that builds a .bitmap file in one call.