bits

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: BSD-2-Clause Imports: 2 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOverrun     = errors.New("go264/bits: read past end of buffer")
	ErrBitCount    = errors.New("go264/bits: bit count out of range")
	ErrInvalidCode = errors.New("go264/bits: malformed exponential-Golomb code")
	ErrRange       = errors.New("go264/bits: value out of representable range")
	ErrTrailing    = errors.New("go264/bits: missing rbsp_stop_one_bit")
	ErrAlignment   = errors.New("go264/bits: unexpected non-zero alignment bit")
)

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(data []byte) *Reader

func (*Reader) BitPos

func (r *Reader) BitPos() int

func (*Reader) BitsLeft

func (r *Reader) BitsLeft() int

func (*Reader) ByteAligned

func (r *Reader) ByteAligned() bool

func (*Reader) MoreRBSPData

func (r *Reader) MoreRBSPData() bool

func (*Reader) PeekBits

func (r *Reader) PeekBits(n int) (uint32, error)

func (*Reader) ReadBit

func (r *Reader) ReadBit() (uint32, error)

func (*Reader) ReadBits

func (r *Reader) ReadBits(n int) (uint32, error)

func (*Reader) ReadFlag

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

func (*Reader) ReadRBSPTrailingBits

func (r *Reader) ReadRBSPTrailingBits() error

func (*Reader) ReadSE

func (r *Reader) ReadSE() (int32, error)

func (*Reader) ReadTE

func (r *Reader) ReadTE(max uint32) (uint32, error)

func (*Reader) ReadUE

func (r *Reader) ReadUE() (uint32, error)

func (*Reader) Reset

func (r *Reader) Reset(data []byte)

func (*Reader) Seek

func (r *Reader) Seek(bitPos int) error

func (*Reader) Skip

func (r *Reader) Skip(n int) error

type Writer

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

func NewWriter

func NewWriter() *Writer

func NewWriterSize

func NewWriterSize(capacity int) *Writer

func (*Writer) AlignOne

func (w *Writer) AlignOne()

func (*Writer) AlignZero

func (w *Writer) AlignZero()

func (*Writer) BitsWritten

func (w *Writer) BitsWritten() int

func (*Writer) ByteAligned

func (w *Writer) ByteAligned() bool

func (*Writer) Bytes

func (w *Writer) Bytes() []byte

func (*Writer) Err

func (w *Writer) Err() error

func (*Writer) Reset

func (w *Writer) Reset()

func (*Writer) WriteBit

func (w *Writer) WriteBit(b uint32)

func (*Writer) WriteBits

func (w *Writer) WriteBits(v uint32, n int)

func (*Writer) WriteFlag

func (w *Writer) WriteFlag(f bool)

func (*Writer) WriteRBSPTrailingBits

func (w *Writer) WriteRBSPTrailingBits()

func (*Writer) WriteSE

func (w *Writer) WriteSE(v int32)

func (*Writer) WriteTE

func (w *Writer) WriteTE(v, max uint32)

func (*Writer) WriteUE

func (w *Writer) WriteUE(v uint32)

Jump to

Keyboard shortcuts

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