Module Repr.Unboxed

Unboxed operations assumes that value being serialized is fully filling the underlying buffer. When that's the case, it is not necessary to prefix the value's binary representation by its size, as it is exactly the buffer's size.

Unboxed operations only apply to top-level string-like values. These are defined as follows:

When unboxed operations are applied to values not supporting that operation, they automatically fall-back to their boxed counter-part.

val encode_bin : 'a Repr__.Type.t -> ('a -> (string -> unit) -> unit) Repr__.Type.staged

Same as encode_bin for unboxed values.

val decode_bin : 'a Repr__.Type.t -> (string -> int Stdlib.ref -> 'a) Repr__.Type.staged

Same as decode_bin for unboxed values.

val size_of : 'a Repr__.Type.t -> 'a Repr__.Type.size_of

Same as size_of for unboxed values.