package granary

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

Module Granary_encoding.VarintSource

Variable-length integer encoding. Uses LEB128 for unsigned, zigzag+LEB128 for signed.

Sourceval encode_uint64 : Buffer.t -> int64 -> unit

encode_uint64 buf n appends the LEB128 encoding of n to buf.

Sourceval decode_uint64 : Bytes.t -> int -> int64 * int

decode_uint64 buf off returns (value, new_offset).

Sourceval encode_int64 : Buffer.t -> int64 -> unit

encode_int64 buf n appends the zigzag+LEB128 encoding of n to buf.

Sourceval decode_int64 : Bytes.t -> int -> int64 * int

decode_int64 buf off returns (value, new_offset).