Crate gix_pack

Source
Expand description

Git stores all of its data as Objects, which are data along with a hash over all data. Storing objects efficiently is what git packs are concerned about.

Packs consist of data files and index files. The latter can be generated from a data file and make accessing objects within a pack feasible.

A Bundle conveniently combines a data pack alongside its index to allow finding objects or verifying the pack. Objects returned by .find(…) are objects which know their pack location in order to speed up various common operations like creating new packs from existing ones.

When traversing all objects in a pack, a delta tree acceleration structure can be built from pack data or an index in order to decompress packs in parallel and without any waste.

§Feature Flags

  • generate (enabled by default) — generate new packs from a set of objects.
  • streaming-input (enabled by default) — Receive a pack as datastream and resolve it
  • pack-cache-lru-static — Provide a fixed-size allocation-free LRU cache for packs. It’s useful if caching is desired while keeping the memory footprint for the LRU-cache itself low.
  • pack-cache-lru-dynamic — Provide a hash-map based LRU cache whose eviction is based a memory cap calculated from object data.
  • object-cache-dynamic — If set, select algorithms may additionally use a full-object cache which is queried before the pack itself.
  • serde — Data structures implement serde::Serialize and serde::Deserialize.
  • wasm — Make it possible to compile to the wasm32-unknown-unknown target.
  • document-features — If enabled, cargo doc will see feature documentation from this manifest.

Modules§

Structs§

  • A bundle of pack data and the corresponding pack index

Traits§

  • Describe how object can be located in an object store with built-in facilities to supports packs specifically.
  • An extension trait with convenience functions.