package git
Module type Value.RAWSource
Interface which describes raw operations. That means all serialization/unserialization to a Cstruct.t.
module Hash : sig ... endmodule Inflate : sig ... endmodule Deflate : sig ... endinclude module type of Value
val kind : t -> [ `Commit | `Blob | `Tree | `Tag ]kind o returns the kind of the Git object.
val pp_kind : [ `Commit | `Blob | `Tree | `Tag ] Fmt.tpp_kind ppf kind is a human readable pretty-printer of kind.
module MakeMeta (Meta : Encore.Meta.S) : sig ... endmodule A : sig ... endmodule M : sig ... endmodule D : sig ... endmodule E : sig ... endval hash : t -> intval length : t -> int64module EncoderRaw : sig ... endmodule DecoderRaw : sig ... endmodule EncoderWithoutHeader : sig ... endval to_deflated_raw :
raw:Cstruct.t ->
etmp:Cstruct.t ->
?level:int ->
ztmp:Cstruct.t ->
t ->
(string, E.error) resultto_deflated_raw ?capacity ?level ~ztmp value serializes and deflates the value value. capacity is the memory consumption of the encoder in bytes (default to 0x100), level is the level of the compression (default to 4) and ztmp is an internal buffer used to store the serialized value before the deflation.
All error from the Deflate module is relayed to the `Deflate error value.
val to_raw :
raw:Cstruct.t ->
etmp:Cstruct.t ->
t ->
(string, EncoderRaw.error) resultto_raw ?capacity value serializes the value value. capacity is the memory consumption of the encoder in bytes (default to 0x100).
This function can not returns an EE.error (see EE).
val to_raw_without_header :
raw:Cstruct.t ->
etmp:Cstruct.t ->
t ->
(string, EncoderWithoutHeader.error) resultval of_raw :
kind:[ `Commit | `Blob | `Tree | `Tag ] ->
Cstruct.t ->
(t, Error.Decoder.t) resultof_raw ~kind inflated makes a Git object as an OCaml value t. This decoder does not expect an header to recognize which kind of Git object is it. That means the inflated raw should not contain kind size\000 at the beginning (in this case, you should use of_raw_with_header.
val of_raw_with_header : Cstruct.t -> (t, DecoderRaw.error) resultof_raw_with_header inflated makes a Git object as an OCaml value t. This decoder expects an header to choose which Git object it is.