package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

containers-3.16.tbz
sha256=1e7992cb2e59c0d2290d1b6c3a31531b3f310be6170b8ef3dde17ccd876b5b79
sha512=bb124e69ad0690f88393e18eee499be07761e767593558867aab32f643466b43258ced503170b154ca3b56dbd68987abd6d9438cf473707ec9866511589a5b84

doc/containers.leb128/Containers_leb128/Decode/index.html

Module Containers_leb128.DecodeSource

Sourceval decode_zigzag : int64 -> int64

Turn an unsigned integer into a signed one.

See https://en.wikipedia.org/wiki/Variable-length_quantity#Zigzag_encoding

Sourceval skip : Byte_slice.t -> int -> int

skip slice off reads an integer at offset off, and returns how many bytes the integer occupies.

Sourceval u64 : Byte_slice.t -> int -> int64 * int

u64 slice off reads an integer at offset off, and returns a pair v, n_consumed. v is the read integer, n_consumed is the number of bytes consumed during reading.

Sourceval i64 : Byte_slice.t -> int -> int64 * int

Read a signed int64 by reading a u64 and zigzag decoding it

Sourceval int_truncate : Byte_slice.t -> int -> int * int

Like i64 but truncates to integer. Returns a pair v, n_consumed.

Sourceval uint_truncate : Byte_slice.t -> int -> int * int

Like u64 but truncates to integer.

OCaml

Innovation. Community. Security.