package cactus

  1. Overview
  2. Docs
type t

The type for values.

val t : t Repr.t
val encode : t -> string

encode is an encoding function. The resultant encoded values must have size encoded_size.

val encoded_size : int

encoded_size is the size of the result of encode, expressed in number of bytes.

val decode : string -> t

decode s off is the decoded form of the encoded value at the offset off of string s. Must satisfy decode (encode t) 0 = t.