package git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The encoder (which uses a Minienc.encoder) of the Git object. We constraint the output to be a

struct.t

. This encoder needs the level of the compression, the value t, the memory consumption of the encoder (in bytes - must be a power of two) and an internal buffer between the compression and the encoder.

All error from the Deflate module is relayed to the `Deflate error value.

The encoder includes an header process. This encoder does not correspond directly to a serialized Git object but a serialized Git loose object. That means we put in front of the Git object an header:

> kind length\000 ...

type t = t
type init = int * t * int * Cstruct.t
type error = [
  1. | `Deflate of Deflate.error
]
type encoder
val pp_error : error Fmt.t
val default : init -> encoder
val eval : Cstruct.t -> encoder -> [ `Flush of encoder | `End of encoder * int | `Error of error ]
val flush : int -> int -> encoder -> encoder
val used : encoder -> int
OCaml

Innovation. Community. Security.