obu

package
v1.8.10 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Overview

Package obu implements tools for working with the Open Bitstream Unit.

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToReadLEB128 = errors.New("payload ended before LEB128 was finished")

ErrFailedToReadLEB128 indicates that a buffer ended before a LEB128 value could be successfully read

Functions

func EncodeLEB128

func EncodeLEB128(in uint) (out uint)

EncodeLEB128 encodes a uint as LEB128

func ReadLeb128

func ReadLeb128(in []byte) (uint, uint, error)

ReadLeb128 scans an buffer and decodes a Leb128 value. If the end of the buffer is reached and all MSB are set an error is returned

func WriteToLeb128 added in v1.8.4

func WriteToLeb128(in uint) []byte

WriteToLeb128 writes a uint to a LEB128 encoded byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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