Documentation ¶
Index ¶
Constants ¶
const ByteSize = 8
ByteSize is the size of a byte in bits (typically 8)
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress takes a slice of bytes and returns a slice of bytes representing the compressed stream
func Decompress ¶
Decompress takes a slice of bytes and returns a slice of bytes representing the decompressed stream
Types ¶
type BitSlice ¶
type BitSlice []bool
BitSlice represents a slice of bits (represented as bools)
func FromByteSlice ¶
func GetNextBit ¶
GetNextBit returns the next bit and a new bit slice with the first bit popped off. If there are no more bits, then the function returns 0.
func PushBits ¶
PushBits takes a BitSlice, a bit, and the number of pendingBits. PushBits returns the BitSlice with the bit and pendingBits pushed.
func PushBitsPending ¶
func (BitSlice) AsByteSlice ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents frequency tables for characters in a byte
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader takes an io.Reader to read from when decompressing