Documentation ¶
Index ¶
- Variables
- func GetBit16(v []byte, pos uint) uint8
- func GetBit8(v uint8, pos uint) uint8
- func GetBits16(v []byte, pos uint, n uint) uint16
- func GetBits8(v uint8, pos uint, n uint) uint8
- type BitReader
- func (br *BitReader) ReadBit() (uint8, error)
- func (br *BitReader) ReadBits16(n uint) (r uint16, err error)
- func (br *BitReader) ReadBits32(n uint) (r uint32, err error)
- func (br *BitReader) ReadBits64(n uint) (r uint64, err error)
- func (br *BitReader) ReadBits8(n uint) (r uint8, err error)
- func (br *BitReader) ReadBytes(n uint) (r []byte, err error)
- func (br *BitReader) ReadGolomb() (v uint32, err error)
- type BitWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNazaBits = errors.New("nazabits: fxxk")
Functions ¶
Types ¶
type BitReader ¶ added in v0.11.0
type BitReader struct {
// contains filtered or unexported fields
}
func NewBitReader ¶ added in v0.11.0
func (*BitReader) ReadBits16 ¶ added in v0.12.1
@param n: 取值范围 [1, 16]
func (*BitReader) ReadBits32 ¶ added in v0.12.1
@param n: 取值范围 [1, 32]
func (*BitReader) ReadBits64 ¶ added in v0.15.0
@param n: 取值范围 [1, 64]
func (*BitReader) ReadGolomb ¶ added in v0.13.0
0阶指数哥伦布编码
type BitWriter ¶ added in v0.11.0
type BitWriter struct {
// contains filtered or unexported fields
}
func NewBitWriter ¶ added in v0.11.0
func (*BitWriter) WriteBits16 ¶ added in v0.12.0
func (*BitWriter) WriteBits8 ¶ added in v0.12.0
将<v>的低<n>位写入 @param n: 取值范围 [1, 8]
Click to show internal directories.
Click to hide internal directories.