module Pack_index

: sig

Pack indexes.

type t = {
# offsets
: int SHA.Map.t;
# crcs
: int32 SHA.Map.t;
# pack_checksum
: SHA.t;

offsests is the positions of the SHA objects in the corresponding raw pack file.

crcs contains the CRC-32 value of the packed object data.

pack_checksum is the corresponding pack file checksums, value which is needed when writing the pack index file to disk.

include Object.S with type t := t
val keys : Mstruct.t -> SHA.Set.t

Read only the keys contained in the index.

val lengths : t -> int option SHA.Map.t

lengths returns the difference between two consecutive offsets (appart for the last elements, where the lenght can be None is the index file is build from a raw pack file).

val empty : ?pack_checksum:SHA.t -> unit -> t

The empty pack index.