Utility functions for marshalling to and from Bigstring.
In all functions below, pos
is the index into the bigstring to read from or write to
and an exception is raised if that index is invalid. The default is 0.
val marshal_blit : ?flags:Marshal.extern_flags Core_kernel__.Import.list ‑> _ ‑> ?pos:Core_kernel__.Import.int ‑> ?len:Core_kernel__.Import.int ‑> Bigstring.t ‑> Core_kernel__.Import.int
Marshals value _
to the bigstring at most len
bytes.
val marshal : ?flags:Marshal.extern_flags Core_kernel__.Import.list ‑> _ ‑> Bigstring.t
Marshals value _
to a new bigstring. This function may need two times more memory
than marshal_blit
.
[]
val marshal_data_size : ?pos:Core_kernel__.Import.int ‑> Bigstring.t ‑> Core_kernel__.Import.int
The length of marshalled data in the bigstring
val unmarshal : ?pos:Core_kernel__.Import.int ‑> Bigstring.t ‑> _
Unmarshals a value from the bigstring and/or returns the index of the byte in the bigstring right after the unmarshalled value.
val unmarshal_next : ?pos:Core_kernel__.Import.int ‑> Bigstring.t ‑> _ * Core_kernel__.Import.int
val skip : ?pos:Core_kernel__.Import.int ‑> Bigstring.t ‑> Core_kernel__.Import.int