Module Unpack.Random_access

Parameters

module Hash : sig ... end
module Mapper : sig ... end
module Inflate : sig ... end

Signature

include D with module Hash := Hash with module Mapper := Mapper with module Inflate := Inflate
module Hunk : H with module Hash := Hash
module Pack : P with module Hash := Hash and module Inflate := Inflate and module Hunk := Hunk
type error =
| Invalid_hash of Hash.t

Appears when the user requested a wrong hash.

| Invalid_offset of int64

Appears when the given offset is not available inside the PACK file.

| Invalid_target of int * int

Appears when the result of the application of a P.H.hunks returns a bad raw.

| Unpack_error of Pack.t * Window.t * Pack.error

Appears when we have an P.error.

| Mapper_error of Mapper.error

The type error.

val pp_error : error Fmt.t

Pretty-printer for error.

type kind = [
| `Commit
| `Blob
| `Tree
| `Tag
]

The type of the kind of the git object.

type pack

The type of the decoder.

val idx : pack -> Hash.t -> (Checkseum.Crc32.t * int64) option
val extern : pack -> Hash.t -> (kind * Cstruct.t) option Lwt.t
val update_idx : (Hash.t -> (Checkseum.Crc32.t * int64) option) -> pack -> pack
val update_extern : (Hash.t -> (kind * Cstruct.t) option Lwt.t) -> pack -> pack
val make : ?⁠bucket:int -> Mapper.fd -> (Hash.t -> (Checkseum.Crc32.t * int64) option) -> (Hash.t -> (kind * Cstruct.t) option Lwt.t) -> (packMapper.error) Stdlib.result Lwt.t
module Diff : sig ... end
module Patch : sig ... end
module Base : sig ... end
module Object : sig ... end
module Cache : sig ... end
module Ascendant : sig ... end
module Descendant : sig ... end