package owee

  1. Overview
  2. Docs

Module Owee_bufSource

Low-level buffer manipulation library

Sourceval map_binary : string -> t
Sourceval size : t -> int

Size of the buffer

Sourceexception Invalid_format of string

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

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

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

Sourceval cursor : ?at:int -> t -> cursor
Sourceval seek : cursor -> int -> unit
Sourceval ensure : cursor -> int -> string -> unit
Sourceval advance : cursor -> int -> unit
Sourceval at_end : cursor -> bool
Sourceval 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

Sourcemodule Read : sig ... end
OCaml

Innovation. Community. Security.