module Serialize: sig endtype'at =(Buffer.t -> 'a -> unit) * (string -> int -> int -> int * 'a)
It is a pair (writer, reader). writer is adds the given value
to the buffer. reader takes a message starting position and length of
the message and returns the new position and the value that has been read
exception Too_short of string
Every serializer should check if the message is long enought to read its
value and if not should raise this exception
val unit : unit tval char : char tval int : int t1b -64 to 64 2b -8k to 8k 3b -1M to 1M 4b -128M to 128M 5b bigger
val float : float tval string : string tSerialize.int and the contents.val int31 : int tval pair : 'a t -> 'b t -> ('a * 'b) tval list : 'a t -> 'a list tSerialize.int and its elements concateneted.val map : 'a t -> ('a -> 'b) -> ('b -> 'a) -> 'b tval marshal : 'a t