gobits

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 6 Imported by: 3

README

gobits

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitStream

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

func NewBitStream

func NewBitStream(ba ByteAccessor) *BitStream

func (*BitStream) ConsumeBits

func (bs *BitStream) ConsumeBits(bitCount int64) bool

func (*BitStream) ConsumeBytes

func (bs *BitStream) ConsumeBytes(byteCount int64) bool

func (*BitStream) PeekBits

func (bs *BitStream) PeekBits(bitCount byte) (uint64, bool)

func (*BitStream) ReadBits

func (bs *BitStream) ReadBits(bitCount byte) (uint64, bool)

func (*BitStream) ReadExponentialGolomb

func (bs *BitStream) ReadExponentialGolomb() (uint64, bool)

func (*BitStream) ReadSignedExponentialGolomb

func (bs *BitStream) ReadSignedExponentialGolomb() (int64, bool)

func (*BitStream) ReadUint16

func (bs *BitStream) ReadUint16(bo binary.ByteOrder) (uint16, bool)

func (*BitStream) ReadUint32

func (bs *BitStream) ReadUint32(bo binary.ByteOrder) (uint32, bool)

func (*BitStream) ReadUint64

func (bs *BitStream) ReadUint64(bo binary.ByteOrder) (uint64, bool)

func (*BitStream) ReadUint8

func (bs *BitStream) ReadUint8() (uint8, bool)

func (*BitStream) RemainingBits

func (bs *BitStream) RemainingBits(bitCount int64) bool

func (*BitStream) ResetPos

func (bs *BitStream) ResetPos()

func (*BitStream) RestorePos

func (bs *BitStream) RestorePos(pw PosWrapper)

func (*BitStream) SavePos

func (bs *BitStream) SavePos() PosWrapper

func (*BitStream) Seek

func (bs *BitStream) Seek(byteOffset int64, bitOffset byte) bool

func (*BitStream) WriteBits

func (bs *BitStream) WriteBits(val uint64, bitCount byte) bool

func (*BitStream) WriteExponentialGolomb

func (bs *BitStream) WriteExponentialGolomb(val uint64) bool

func (*BitStream) WriteSignedExponentialGolomb

func (bs *BitStream) WriteSignedExponentialGolomb(val int64) bool

func (*BitStream) WriteUint16

func (bs *BitStream) WriteUint16(val uint16, bo binary.ByteOrder) bool

func (*BitStream) WriteUint32

func (bs *BitStream) WriteUint32(val uint32, bo binary.ByteOrder) bool

func (*BitStream) WriteUint64

func (bs *BitStream) WriteUint64(val uint64, bo binary.ByteOrder) bool

func (*BitStream) WriteUint8

func (bs *BitStream) WriteUint8(val uint8) bool

type ByteAccessor

type ByteAccessor interface {
	At(byteOffset int64) (b byte, ok bool)
	Slice(byteOffset, length int64) []byte
	Put(bytes []byte, byteOffset int64) bool
	Length() int64
}

type IOByteAccessor

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

func NewIOByteAccessor

func NewIOByteAccessor(rwseeker io.ReadWriteSeeker) *IOByteAccessor

func (*IOByteAccessor) At

func (ba *IOByteAccessor) At(byteOffset int64) (byte, bool)

func (*IOByteAccessor) Length

func (ba *IOByteAccessor) Length() int64

func (*IOByteAccessor) Put

func (ba *IOByteAccessor) Put(bytes []byte, byteOffset int64) bool

func (*IOByteAccessor) Reset

func (ba *IOByteAccessor) Reset()

func (*IOByteAccessor) Slice

func (ba *IOByteAccessor) Slice(byteOffset, length int64) []byte

type PosWrapper

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

type SliceByteAccessor

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

func NewSliceByteAccessor

func NewSliceByteAccessor(bytes []byte) *SliceByteAccessor

func (*SliceByteAccessor) At

func (ba *SliceByteAccessor) At(byteOffset int64) (byte, bool)

func (*SliceByteAccessor) Length

func (ba *SliceByteAccessor) Length() int64

func (*SliceByteAccessor) Put

func (ba *SliceByteAccessor) Put(bytes []byte, byteOffset int64) bool

func (*SliceByteAccessor) Slice

func (ba *SliceByteAccessor) Slice(byteOffset, length int64) []byte

Jump to

Keyboard shortcuts

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