bitio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bitio reads the big-endian bit fields codec headers are made of.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	Data []byte
	Err  error
	// contains filtered or unexported fields
}

Reader reads bit fields from Data, most significant bit first. Reading past the end reports Err, so each caller keeps its own error contract.

func (*Reader) Bits

func (r *Reader) Bits(n int) (uint64, error)

Bits reads an n-bit unsigned field, n at most 64.

func (*Reader) Bool

func (r *Reader) Bool() (bool, error)

Bool reads one bit.

func (*Reader) SkipUVLC

func (r *Reader) SkipUVLC() error

SkipUVLC skips an unsigned variable-length code.

func (*Reader) UVLC

func (r *Reader) UVLC() (uint64, error)

UVLC reads an unsigned variable-length code: AV1's uvlc(), which is H.264 and HEVC's ue(v) Exp-Golomb code. 32 leading zeros read as 2^32-1.

Jump to

Keyboard shortcuts

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