leb128

package
v1.6.0-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2019 License: LGPL-3.0, BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package leb128 provides functions for reading integer values encoded in the Little Endian Base 128 (LEB128) format: https://en.wikipedia.org/wiki/LEB128

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadVarUint32

func ReadVarUint32(r io.Reader) (uint32, error)

ReadVarUint32 reads a LEB128 encoded unsigned 32-bit integer from r, and returns the integer value, and the error (if any).

func ReadVarUint32Size

func ReadVarUint32Size(r io.Reader) (res uint32, size uint, err error)

ReadVarUint32Size reads a LEB128 encoded unsigned 32-bit integer from r. It returns the integer value, the size of the encoded value (in bytes), and the error (if any).

func ReadVarint32

func ReadVarint32(r io.Reader) (int32, error)

ReadVarint32 reads a LEB128 encoded signed 32-bit integer from r, and returns the integer value, and the error (if any).

func ReadVarint32Size

func ReadVarint32Size(r io.Reader) (res int32, size uint, err error)

ReadVarint32Size reads a LEB128 encoded signed 32-bit integer from r, and returns the integer value, the size of the encoded value, and the error (if any)

func ReadVarint64

func ReadVarint64(r io.Reader) (int64, error)

ReadVarint64 reads a LEB128 encoded signed 64-bit integer from r, and returns the integer value, and the error (if any).

func ReadVarint64Size

func ReadVarint64Size(r io.Reader) (res int64, size uint, err error)

ReadVarint64Size reads a LEB128 encoded signed 64-bit integer from r, and returns the integer value, the size of the encoded value, and the error (if any)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL