bits

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader .

func NewReader

func NewReader(buf []byte) *Reader

NewReader retruns a new Reader.

func (*Reader) BitsLeft

func (r *Reader) BitsLeft() int

BitsLeft returns the number of left bits.

func (*Reader) BytesLeft

func (r *Reader) BytesLeft() []byte

BytesLeft returns the left byte slice.

func (*Reader) Offset

func (r *Reader) Offset() int

Offset returns the offset of bits.

func (*Reader) Peek

func (r *Reader) Peek(n int) uint64

Peek peek the uint32 of n bits.

func (*Reader) Read

func (r *Reader) Read(n int) uint32

Read read the uint32 of n bits.

func (*Reader) ReadBit

func (r *Reader) ReadBit() uint8

ReadBit read a bit.

func (*Reader) ReadBool

func (r *Reader) ReadBool() bool

ReadBool read one bit bool.

func (*Reader) ReadInt

func (r *Reader) ReadInt(n int) int

ReadInt read the int of n bits.

func (*Reader) ReadInt16

func (r *Reader) ReadInt16(n int) int16

ReadInt16 read the int16 of n bits.

func (*Reader) ReadInt32

func (r *Reader) ReadInt32(n int) int32

ReadInt32 read the int32 of n bits.

func (*Reader) ReadInt64

func (r *Reader) ReadInt64(n int) int64

ReadInt64 read the int64 of n bits.

func (*Reader) ReadInt8

func (r *Reader) ReadInt8(n int) int8

ReadInt8 read the int8 of n bits.

func (*Reader) ReadSe

func (r *Reader) ReadSe() (res int32)

ReadSe .

func (*Reader) ReadSe16

func (r *Reader) ReadSe16() int16

ReadSe16 read the SE of int16.

func (*Reader) ReadSe8

func (r *Reader) ReadSe8() int8

ReadSe8 read the SE of int8.

func (*Reader) ReadUe

func (r *Reader) ReadUe() (res uint32)

ReadUe .

func (*Reader) ReadUe16

func (r *Reader) ReadUe16() uint16

ReadUe16 read the UE GolombCode of uint16.

func (*Reader) ReadUe8

func (r *Reader) ReadUe8() uint8

ReadUe8 read the UE GolombCode of uint8.

func (*Reader) ReadUint

func (r *Reader) ReadUint(n int) uint

ReadUint read the uint of n bits.

func (*Reader) ReadUint16

func (r *Reader) ReadUint16(n int) uint16

ReadUint16 read the uint16 of n bits.

func (*Reader) ReadUint32

func (r *Reader) ReadUint32(n int) uint32

ReadUint32 read the uint32 of n bits.

func (*Reader) ReadUint64

func (r *Reader) ReadUint64(n int) uint64

ReadUint64 read the uint64 of n bits.

func (*Reader) ReadUint8

func (r *Reader) ReadUint8(n int) uint8

ReadUint8 read the uint8 of n bits.

func (*Reader) Skip

func (r *Reader) Skip(n int)

Skip skip n bits.

Jump to

Keyboard shortcuts

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