package metadata

  1. Overview
  2. Docs
type t = {
  1. read : bytes -> int -> int -> int;
  2. seek : int -> unit;
  3. size : unit -> int option;
  4. reset : unit -> unit;
}

A function to read taking the buffer to fill the offset and the length and returning the number of bytes actually read.

val retry : ('a -> int -> int -> int) -> 'b -> int -> int -> int

Make a reading function retry until buffer is filled (or an error occurs).

val read : t -> int -> string
val drop : t -> int -> unit
val byte : t -> int
val uint8 : t -> int
val int16_be : t -> int
val int16_le : t -> int
val uint16_le : t -> int
val int16 : Metadata__MetadataBase.endianness -> t -> int
val int24_be : t -> int
val int32_le : t -> int
val uint32_le : t -> int
val int32_be : t -> int
val size : t -> int option
val reset : t -> unit

Go back at the beginning of the stream.

val with_file : (t -> 'a) -> string -> 'b
val with_string : (t -> 'a) -> string -> 'b
OCaml

Innovation. Community. Security.