package binsec

  1. Overview
  2. Docs

doc/binsec.base/Binsec_base/Reader/Read/index.html

Module Reader.ReadSource

Sourceval u8 : 'a t -> uint8
Sourceval u16 : 'a t -> uint16
Sourceval u32 : 'a t -> uint32
Sourceval u64 : 'a t -> uint64
Sourceval i8 : 'a t -> int8
Sourceval i16 : 'a t -> int16
Sourceval i32 : 'a t -> int32
Sourceval i64 : 'a t -> int64
Sourceval uleb128 : 'a t -> Z.t
Sourceval sleb128 : 'a t -> Z.t
Sourceval bv8 : 'a t -> Bitvector.t
Sourceval bv16 : 'a t -> Bitvector.t
Sourceval bv32 : 'a t -> Bitvector.t
Sourceval bv64 : 'a t -> Bitvector.t
Sourceval read : 'a t -> int -> Bitvector.t
Sourceval bytes : 'a t -> int -> string

bytes t len gets a string of exactly len bytes from t

Sourceval fixed_string : 'a t -> int -> string

fixed_string t len gets a string of maximum len bytes from t

Sourceval zero_string : string -> 'a t -> ?maxlen:int -> unit -> string

zero_string msg t ?maxlen () gets a zero-terminated string from t, stopping at the first zero or when maxlen is reached, if it was provided.

Sourceval sub : 'a t -> int -> 'a t

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.