leb128

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

https://en.wikipedia.org/wiki/LEB128

Index

Constants

View Source
const (
	Size32 = 5
	Size64 = 10
)

Variables

This section is empty.

Functions

func DecodeI64

func DecodeI64(r func() byte) int64

func DecodeU64

func DecodeU64(r func() byte) uint64

func ReadSlice

func ReadSlice(s []byte) func() byte

Types

type Leb128

type Leb128 struct {
	B [Size64]byte
	L uint8
}

func EncodeI64

func EncodeI64(v int64) (l Leb128)

func EncodeU64

func EncodeU64(v uint64) (l Leb128)

func (Leb128) Slice

func (l Leb128) Slice() []byte

func (Leb128) String

func (l Leb128) String() string

Jump to

Keyboard shortcuts

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