package bap-dwarf

  1. Overview
  2. Docs
type t

an encoded value

include sig ... end
val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.reader
val compare : t -> t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a encoder = ?signed:bool -> 'a -> t

encode ~signed v encodes value v in a LEB128 format. If signed is true, then uses signed encoding.

decode leb decodes a number from LEB128 representation.

type 'a decoder = t -> 'a Core_kernel.Std.Or_error.t

decode leb decodes a number from LEB128 representation.

val size : t -> int

size leb return size in bytes of the number stored in LEB128 encoding.

val read : ?signed:bool -> string -> pos_ref:int Core_kernel.Std.ref -> t Core_kernel.Std.Or_error.t
val write : t -> string -> pos:int -> unit
val to_int : int decoder
val to_int32 : int32 decoder
val to_int64 : int64 decoder
val of_int : int encoder
val of_int32 : int32 encoder
val of_int64 : int64 encoder
OCaml

Innovation. Community. Security.