The type of the delta-ification.
and delta =
| Z | Means no delta-ification. | ||||||||||||
| S of {
} | Delta-ification with a description of the source. |
The type of error.
val deltas : ?memory:bool -> Entry.t list -> (Hash.t -> Cstruct.t option Lwt.t) -> (Entry.t -> bool) -> int -> int -> ((Entry.t * t) list, error) Stdlib.result Lwt.t
deltas ?memory lst getter tagger window depth
.
This is the main algorithm about the serialization of the git object in a PACK file. The purpose is to order and delta-ify entries.
getter
is a function to access to the real inflated raw of the git object requested by the hash. This function must allocate the raw (or let the ownership to this function). The algorithm takes the ownership anyway.
tagger
is a function to annotate an entry as preferred to serialize firstly.
window
corresponds to the number of how many object(s) we keep for the delta-ification or, if memory
is true
, how many byte(s) we keep for the delta-ification. The client can control the memory consumption of this algorithm precisely if he wants.
depth
is the maximum of the delta-ification allowed.
If you want to understand the algorithm, look the source code.