package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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 Base.List.t -> _ -> ?pos:Base.Int.t -> ?len:Base.Int.t -> Bigstring.t -> Base.Int.t

Marshals value _ to the bigstring at most len bytes.

val marshal : ?flags:Marshal.extern_flags Base.List.t -> _ -> Bigstring.t

Marshals value _ to a new bigstring. This function may need two times more memory than marshal_blit.

  • parameter flags

    default = []

val marshal_data_size : ?pos:Base.Int.t -> Bigstring.t -> Base.Int.t

The length of marshalled data in the bigstring

val unmarshal : ?pos:Base.Int.t -> 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:Base.Int.t -> Bigstring.t -> _ * Base.Int.t
val skip : ?pos:Base.Int.t -> Bigstring.t -> Base.Int.t
OCaml

Innovation. Community. Security.