package owee

  1. Overview
  2. Docs

Low-level buffer manipulation library

val dim : t -> int

Size of the buffer

exception Invalid_format of string

Minimal support for error reporting. FIXME: Improve that someday.

val invalid_format : string -> 'a
val assert_format : bool -> string -> unit
type s8 = int
type u8 = int
type u16 = int
type s32 = int
type u32 = int
type u64 = int
type s128 = int
type u128 = int
type cursor = {
  1. buffer : t;
  2. mutable position : int;
}

A mutable cursor, pointing to an arbitrary position of a buffer

val cursor : ?at:int -> t -> cursor
val seek : cursor -> int -> unit
val ensure : cursor -> int -> string -> unit
val advance : cursor -> int -> unit
val at_end : cursor -> bool
val sub : cursor -> int -> cursor

sub t len returns a fresh cursor pointing to the beginning of a sub-buffer of size len starting from t, and advances t by len

module Read : sig ... end
OCaml

Innovation. Community. Security.