package metadata

  1. Overview
  2. Docs

Module PDF.RSource

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 : (Metadata__.MetadataBase.parser_handler -> unit) 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 retry : ('a -> int -> int -> int) -> 'a -> int -> int -> int

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

Sourceval read : t -> int -> string
Sourceval read_tag : length:int -> label:string -> t -> string option
Sourceval drop : t -> int -> unit
Sourceval byte : t -> int
Sourceval uint8 : t -> int
Sourceval int16_be : t -> int
Sourceval int16_le : t -> int
Sourceval uint16_le : t -> int
Sourceval int16 : Metadata__.MetadataBase.endianness -> t -> int
Sourceval int24_be : t -> int
Sourceval int32_le : t -> int
Sourceval uint32_le : t -> int
Sourceval int32_be : t -> int
Sourceval int64_be : t -> int64
Sourceval size : t -> int option
Sourceval reset : t -> unit

Reset state like after the file was just opened (position is at the beginning in particular).

Sourceval find : t -> string -> bool

Try to find a specific string starting from current position in the file.

Sourceval until : t -> string -> string

Return the contents until we reach a specific string (not included).

Sourceval with_file : ?custom_parser:(Metadata__.MetadataBase.parser_handler -> unit) -> (t -> 'a) -> string -> 'a
Sourceval with_string : ?custom_parser:(Metadata__.MetadataBase.parser_handler -> unit) -> (t -> 'a) -> string -> 'a