leb128

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendInt32

func AppendInt32(data []byte, v int32) []byte

AppendInt32 encodes and writes the given signed 32-bit integer in canonical (with the fewest bytes possible) signed little-endian base-128 format

func AppendInt64

func AppendInt64(data []byte, v int64) []byte

AppendInt64 encodes and writes the given signed 64-bit integer in canonical (with the fewest bytes possible) signed little-endian base-128 format

func AppendUint32

func AppendUint32(data []byte, v uint32) []byte

AppendUint32 encodes and writes the given unsigned 32-bit integer in canonical (with the fewest bytes possible) unsigned little-endian base-128 format

func AppendUint32FixedLength

func AppendUint32FixedLength(data []byte, v uint32, length int) ([]byte, error)

AppendUint32FixedLength encodes and writes the given unsigned 32-bit integer in non-canonical (fixed-size, instead of with the fewest bytes possible) unsigned little-endian base-128 format

func AppendUint64

func AppendUint64(data []byte, v uint64) []byte

AppendUint64 encodes and writes the given unsigned 64-bit integer in canonical (with the fewest bytes possible) unsigned little-endian base-128 format

func ReadInt32

func ReadInt32(data []byte) (result int32, count int, err error)

ReadInt32 reads and decodes a signed 32-bit integer

func ReadInt64

func ReadInt64(data []byte) (result int64, count int, err error)

ReadInt64 reads and decodes a signed 64-bit integer

func ReadUint32

func ReadUint32(data []byte) (result uint32, count int, err error)

ReadUint32 reads and decodes an unsigned 32-bit integer

func ReadUint64

func ReadUint64(data []byte) (result uint64, count int, err error)

ReadUint64 reads and decodes an unsigned 64-bit integer

Types

This section is empty.

Jump to

Keyboard shortcuts

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