Module Brassaia_eio_pack.Pack_value

This module defines abstractions over entries in the pack file, which are encoded as follows:

      ┌────────┬────────┬──────────────┬─────────┐
      │  Hash  │  Kind  │  Len(Value)? │  Value  │
      └────────┴────────┴──────────────┴─────────┘
      ┆<┄ H ┄┄>┆<┄ K ┄┄>┆<┄┄┄┄ L? ┄┄┄┄>┆<┄┄ V ┄┄>┆
      ┆<┄┄┄┄┄┄┄┄┄┄┄ entry length, E ┄┄┄┄┄┄┄┄┄┄┄┄>┆

The fields are as follows:

The length of the overall pack entry, as referenced in the Pack_index or in a direct Pack_key.t, is equal to E = H + K + L + V.

module Kind : sig ... end
type nonrec weight = Pack_value_intf.weight =
  1. | Immediate of int
  2. | Deferred of unit -> int
type nonrec kinded = Pack_value_intf.kinded = ..

kinded is an extenisble variant that each S extends so that it can define S.to_kinded and S.of_kinded. Its purpose is to allow containers, such as Brassaia_pack_unix.Lru, to store and return all types of S and thus be usable by modules defined over S, such as Brassaia_pack_unix.Pack_store.

module type S = Pack_value_intf.S with type kind := Kind.t
module type Config = Pack_value_intf.Config