package git

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

Module Loose.ESource

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 ...

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