Documentation ¶
Index ¶
- Variables
- type BitReader
- func (p *BitReader) BitsLeft() uint
- func (p *BitReader) ByteAlign()
- func (p *BitReader) ByteOffset() uint64
- func (p *BitReader) BytesLeft() uint
- func (p *BitReader) HasBitLeft() bool
- func (p *BitReader) HasByteLeft() bool
- func (p *BitReader) HasBytesLeft(n uint) bool
- func (p *BitReader) PeekBit() (byte, error)
- func (p *BitReader) PeekBits(n uint) (uint, error)
- func (p *BitReader) ReadBit() (byte, error)
- func (p *BitReader) ReadBitAsBool() (bool, error)
- func (p *BitReader) ReadBits(n uint) (byte, error)
- func (p *BitReader) ReadBitsAsInt(n uint) (int, error)
- func (p *BitReader) ReadBitsAsUInt(n uint) (uint, error)
- func (p *BitReader) ReadBitsAsUInt16(n uint) (uint16, error)
- func (p *BitReader) ReadBitsAsUInt32(n uint) (uint32, error)
- func (p *BitReader) ReadBitsAsUInt8(n uint) (uint8, error)
- func (p *BitReader) ReadBitsToByteArray(n uint) ([]byte, error)
- func (p *BitReader) ReadBytes(n uint) ([]byte, error)
- func (p *BitReader) ReadSE() (int32, error)
- func (p *BitReader) ReadUE() (uint32, error)
- func (p *BitReader) Reset()
- func (p *BitReader) SkipBits(n uint) error
- func (p *BitReader) SkipBytes(n uint) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrExpGolombDecode represents an error in decoding a number represented in exponential-golomb coding ErrExpGolombDecode = errors.New("could not complete Exp-Golomb decode") // ErrReaderOutOfBounds is returned if an attempt is made to read from a parser that has been depleted ErrReaderOutOfBounds = errors.New("cannot read past end of reader bytes") )
Functions ¶
This section is empty.
Types ¶
type BitReader ¶
type BitReader struct {
// contains filtered or unexported fields
}
func NewBitReader ¶
func (*BitReader) ByteAlign ¶
func (p *BitReader) ByteAlign()
Pefrom byte alignment (skip any remaining bits of current byte)
func (*BitReader) ByteOffset ¶
func (*BitReader) HasBitLeft ¶
Return if there's a bit left in the stream
func (*BitReader) HasByteLeft ¶
Return if there is a byte left in the stream
func (*BitReader) HasBytesLeft ¶
Return if there are n bytes left in the stream
func (*BitReader) ReadBitAsBool ¶
func (*BitReader) ReadBitsAsInt ¶
Return the number of bits as a signed integer
func (*BitReader) ReadBitsAsUInt ¶
Return the number of bits as an unsigned integer
func (*BitReader) ReadBitsAsUInt16 ¶
Return the number of bits as an unsigned integer
func (*BitReader) ReadBitsAsUInt32 ¶
Return the number of bits as an unsigned integer
func (*BitReader) ReadBitsAsUInt8 ¶
Return the number of bits as an unsigned integer
func (*BitReader) ReadBitsToByteArray ¶
Return n number of bits into a byte array
func (*BitReader) Reset ¶
func (p *BitReader) Reset()
Reset the stream reader back to the start of the buffer
Click to show internal directories.
Click to hide internal directories.