package irmin-pack
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=92a9de7a0a2a35c2feba0c35a806b1f0df24c1c0d15164eebf3f919296d26715
sha512=0203ec5117a851ad5afeb2f9091659b4e142e231b6b945caab93f4d7beb23397c8ac43f7056e91d18f4bff0be1062f6ae966d221f877c229328c0cbbf29fd9f0
doc/irmin-pack.unix/Irmin_pack_unix/Inode/Make_persistent/argument-1-H/index.html
Parameter Make_persistent.H
Signature for digest hashes, inspired by Digestif.
val hash : ((string -> unit) -> unit) -> tCompute a deterministic store key from a sequence of strings.
val short_hash : t -> intshort_hash h is a small hash of h, to be used for instance as the `hash` function of an OCaml Hashtbl.
val to_raw_string : t -> stringto_raw_string t is the raw sequence of bytes in t (of length hash_size).
val unsafe_of_raw_string : string -> tunsafe_of_raw_string b is the hash consisting of the raw sequence of bytes b.
Warning: this function cannot guarantee that the supplied byte string is a valid output of the hash process, so should only be used on strings that are known to have been built with to_raw_string.
short_hash_substring t off computes the short-hash of the raw hash data contained in t at offset off. It has behaviour equivalent to:
Bigstringaf.substring t ~off ~len:hash_size
|> unsafe_of_raw_string
|> short_hashbut may be more efficient due to not needing to allocate an intermediate string.
Value Types
val t : t Irmin.Type.tt is the value type for t.