package bap-std

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A set of low level input operations. Note: it is more effective to use above head iterators, instead of this low level interface, since iterators do not need to check every memory access.

type 'a reader = t -> pos_ref:addr Core_kernel.ref -> 'a Core_kernel.Or_error.t

reader mem ~pos_ref defines a set of functions with a common interface. Each function accepts a memory mem and a pos_ref - a reference to a address that should be read. This reference will be updated for the amount of bytes that was actually read.

  • returns

    a word lifted into a monad.

val word : word_size:size -> word reader

word ~word_size a reader that reads words of word_size

val int8 : word reader

int8 a signed byte reader

val uint8 : word reader

uint8 an unsigned byte reader

val int16 : word reader

int16 a signed 16-bit word reader

val uint16 : word reader

uint16 an unsigned 16-bit word reader

val int32 : word reader

int32 a 32-bit word reader

val int64 : word reader

int64 a 64-bit word reader

OCaml

Innovation. Community. Security.