package git-unix

  1. Overview
  2. Docs
include Git.IO with type t = Git.Value.t

Input/output functions

include Git.S with type t = Git.Value.t
type t = Git.Value.t

The type for the given Git object.

val equal : t -> t -> bool

Are two objects equal?

val hash : t -> int

Hash an object.

val compare : t -> t -> int

Compare two objects.

val pp : t Fmt.t

pp is the pretty-printer for values of type t.

val input : Mstruct.t -> t

Build a value from an inflated contents.

val add : Buffer.t -> ?level:int -> t -> unit

Add the serialization of the value to an already existing buffer.

The compression level must be between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). The default value (currently equivalent to level 6) requests a default compromise between speed and compression.

Inflated values

val name : t -> Git.Hash.t

Return the hash of the serialized contents.

val add_header : Buffer.t -> Git.Object_type.t -> int -> unit

Append the given object header to a buffer.

val add_inflated : Buffer.t -> t -> unit

Append the inflated serialization of an object to a buffer. Similar to add, but without deflating the contents.

val input_inflated : Mstruct.t -> t

Build a value from an inflated contents.

OCaml

Innovation. Community. Security.