util

package
v0.0.0-...-f2d3015 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BitsPerByte = 8

Variables

This section is empty.

Functions

func BitsToByte

func BitsToByte(bits []bool) byte

func BitsToBytes

func BitsToBytes(bits []bool) []byte

func BytesToBits

func BytesToBits(bytes []byte) []bool

func EncodeUint16BE

func EncodeUint16BE(u uint16) []byte

func EncodeUint24BE

func EncodeUint24BE(u uint32) ([]byte, error)

func EncodeUint32BE

func EncodeUint32BE(u uint32) []byte

func StringBits

func StringBits(data []byte) string

func StringBits0

func StringBits0(data []bool) string

Types

type BitQueue

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

func MakeBitBuffer

func MakeBitBuffer(capacity int) *BitQueue

func (*BitQueue) BitCount

func (bb *BitQueue) BitCount() int

func (*BitQueue) Peek

func (bb *BitQueue) Peek(out []bool) int

func (*BitQueue) Put

func (bb *BitQueue) Put(data []bool) int

func (*BitQueue) Skip

func (bb *BitQueue) Skip(count int) int

func (*BitQueue) SpaceCount

func (bb *BitQueue) SpaceCount() int

func (*BitQueue) Take

func (bb *BitQueue) Take(out []bool) int

Jump to

Keyboard shortcuts

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