Utility functions for user convenience
bin_dump ?header writer v uses
writer to first compute the size of
v in the binary protocol, then allocates a buffer of exactly this
size, and then writes out the value. If
size of the resulting binary string will be prefixed as a signed
Failureif the size of the value changes during writing, and any other exceptions that the binary writer in
bin_read_stream ?max_size ~read reader reads binary protocol data
from a stream as generated by the
read function, which places
data of a given length into a given buffer. Requires a header.
reader type class will be used for conversion to OCaml-values.
Failureif the size of the value disagrees with the one specified in the header, and any other exceptions that the binary reader associated with
Failureif the size reported in the data header is longer than
Conversion of binable types
Conversion of iterable types