leb128

package
v0.0.0-...-9094145 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(b []byte, maxbit uint32, hasSign bool) (uint32, int64, error)

Read reads an unsigned integer of size n defined in https://webassembly.github.io/spec/core/binary/values.html#binary-int Read panics if n>64.

func ReadInt32

func ReadInt32(b []byte) (uint32, int32, error)

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

func ReadInt64

func ReadInt64(b []byte) (uint32, int64, error)

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

func ReadUint32

func ReadUint32(b []byte) (uint32, uint32, error)

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

func ReadUint64

func ReadUint64(b []byte) (uint32, uint64, error)

ReadUint64 reads a LEB128 encoded unsigned 64-bit integer from r, and returns the integer 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