Module Make.PInfo

type error = [
| `Unexpected_end_of_input
| `Unexpected_chunk of string
| `PDec of PDec.error
]
val pp_error : error Fmt.t
type delta =
| Unresolved of {
hash : Hash.t;
length : int;
}
| Internal of {
hash : Hash.t;
abs_off : int64;
length : int;
}
| Delta of {
hunks_descr : HDec.hunks;
inserts : int;
depth : int;
from : delta;
}
val needed : delta -> int
val pp_delta : delta Fmt.t
type path =
| Load of int
| Patch of {
hunks : int;
target : int;
src : path;
}
type 'a t = {
index : (Hash.tCheckseum.Crc32.t * int64 * int) Stdlib.Hashtbl.t;
delta : (int64, delta) Stdlib.Hashtbl.t;
hash_pack : Hash.t;
state : 'a;
} constraint 'a = [< `Pass | `Normalized of path | `Resolved of path ]
val v : Hash.t -> [ `Pass ] t
val normalize : length:int -> [ `Pass ] t -> [ `Normalized of path ] t
val resolve : length:int -> [ `Normalized of path ] t -> [ `Resolved of path ] t
val first_pass : ztmp:Cstruct.t -> window:Inflate.window -> ?⁠idx:(Hash.t -> (Checkseum.Crc32.t * int64) option) -> (unit -> Cstruct.t option Lwt.t) -> ([ `Normalized of path ] terror) Stdlib.result Lwt.t