package git-unix

  1. Overview
  2. Docs

The decoder of the Git object. We constraint the input to be an Inflate.window and a

struct.t

which used by the Inflate module and an other

struct.t

as an internal buffer.

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

The decoder includes an header process. This decoder does not correspond directly to a de-serialized Git object but a de-serialized Git loose object.

type t = t
type init = Inflate.window * Cstruct.t * Cstruct.t
type error = [
  1. | Git.Error.Decoder.t
  2. | `Inflate of Inflate.error
]
type decoder
val pp_error : error Fmt.t
val to_result : Cstruct.t -> (t, error) Stdlib.result
val default : init -> decoder
val eval : decoder -> [ `Await of decoder | `End of Cstruct.t * t | `Error of Cstruct.t * error ]
val refill : Cstruct.t -> decoder -> (decoder, error) Stdlib.result
val finish : decoder -> decoder
OCaml

Innovation. Community. Security.