bits

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOutOfBounds = errors.New("bits: read past end of buffer")

ErrOutOfBounds is returned when attempting to read past the end of the buffer.

Functions

This section is empty.

Types

type Bits

type Bits struct {
	// contains filtered or unexported fields
}

func Append

func Append(bits *Bits, buf []byte) *Bits

func New

func New(vec []byte) *Bits

func (*Bits) Bit

func (b *Bits) Bit() int

func (*Bits) BitPos

func (b *Bits) BitPos() int

func (*Bits) Bits

func (b *Bits) Bits(num int) int

func (*Bits) Err added in v1.1.0

func (b *Bits) Err() error

Err returns any error that occurred during bit reading operations. Once an error occurs, subsequent reads will continue to return the error.

func (*Bits) LenInBytes

func (b *Bits) LenInBytes() int

func (*Bits) SetPos

func (b *Bits) SetPos(pos int)

func (*Bits) Tail

func (b *Bits) Tail(offset int) []byte

Jump to

Keyboard shortcuts

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