package metadata

  1. Overview
  2. Docs

Module Metadata.ReaderSource

Abstractions for reading from various sources.

Sourcetype t = {
  1. read : bytes -> int -> int -> int;
  2. read_ba : (int -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t) option;
  3. custom_parser : custom_parser option;
  4. seek : int -> unit;
  5. size : unit -> int option;
  6. 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.

Sourceval reset : t -> unit

Go back at the beginning of the stream.

Sourceval with_file : ?custom_parser:custom_parser -> (t -> metadata) -> string -> metadata

Specialize a parser to operate on files.

Sourceval with_string : ?custom_parser:custom_parser -> (t -> metadata) -> string -> metadata

Specialize a parser to operate on strings.