package git

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

The Git Blob is structurally a Cstruct.t independantly of the hash implementation.

module MakeMeta (Meta : Encore.Meta.S) : sig ... end
module A : sig ... end
module M : sig ... end
module D : sig ... end
module E : sig ... end
val digest : t -> H.t
val pp : t Fmt.t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
module Set : Set.S with type elt = t
module Map : Map.S with type key = t
val length : t -> int64

length t returns the length of the blob object t. Note that we use Cstruct.t.len and cast result to int64.

val of_cstruct : Cstruct.t -> t

of_cstruct cs returns the blob value of a Cstruct.t. This function does not take the ownership on cs. So, consider at this time to not change cs and consider it as a constant.

val to_cstruct : t -> Cstruct.t

to_cstruct blob returns the Cstruct.t of the Blob blob. This function does not create a fresh Cstruct.t, so consider it as a constant Cstruct.t (set functions not allowed).

val of_string : string -> t

of_string s returns the blob value of a string.

val to_string : t -> string

to_string blob returns a string which contains the blob value - in other words, the content of your file.

OCaml

Innovation. Community. Security.