The Git Blob is structurally a Cstruct.t
independantly of the hash implementation.
module MakeMeta : functor (Meta : Encore.Meta.S) -> sig ... end
module A : sig ... end
module M : sig ... end
module D : sig ... end
module E : sig ... end
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
.
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.
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.