leb128

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package leb128 provides encoders and decoders for The Little Endian Base 128 format. The Little Endian Base 128 format is defined in the DWARF v4 standard, section 7.6, page 161 and following.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeSigned

func DecodeSigned(buf Reader) (int64, uint32)

DecodeSigned decodes a signed Little Endian Base 128 represented number.

func DecodeUnsigned

func DecodeUnsigned(buf Reader) (uint64, uint32)

DecodeUnsigned decodes an unsigned Little Endian Base 128 represented number.

func EncodeSigned

func EncodeSigned(out io.ByteWriter, x int64)

EncodeSigned encodes x to the signed Little Endian Base 128 format.

func EncodeUnsigned

func EncodeUnsigned(out io.ByteWriter, x uint64)

EncodeUnsigned encodes x to the unsigned Little Endian Base 128 format.

Types

type Reader

type Reader interface {
	io.ByteReader
	io.Reader
	Len() int
}

Reader is a io.ByteReader with a Len method. This interface is satisfied by both bytes.Buffer and bytes.Reader.

Jump to

Keyboard shortcuts

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