package bin_prot

  1. Overview
  2. Docs

An Opaque.Bigstring.t or Opaque.String.t is an arbitrary piece of bin-prot. The bin-prot (de-)serializers simply read/write the data, prefixed with its size.

When reading bin-prot data, sometimes you won't care about deserializing a particular piece: perhaps you want to operate on a bin-prot stream, transforming some bits of the stream and passing the others through untouched. In these cases you can deserialize using the bin-prot converters for a type involving Opaque.t. This is analogous to reading a sexp file / operating on a sexp stream and using (de-)serialization functions for a type involving Sexp.t.

The internal representation of Opaque.Bigstring.t is a Bigstring, while Opaque.String.t is a string.

module Bigstring : sig ... end
module String : sig ... end