Codecs.Chain
A module containing functions to encode/decode an array chunk using a predefined set of codecs.
val create : int array -> codec_chain -> t
create s c
returns a type representing a chain of codecs defined by chain c
and chunk shape s
.
encode t x
computes the encoded byte string representation of array chunk x
.
val decode : t -> 'a array_repr -> string -> 'a Ndarray.t
decode t repr x
decodes the byte string x
using codec chain t
and decoded representation type repr
.
val of_yojson : int array -> Yojson.Safe.t -> (t, string) Stdlib.result
of_yojson x
returns a code chain of type t
from its json object representation.
val to_yojson : t -> Yojson.Safe.t
to_yojson x
returns a json object representation of codec chain x
.