Documentation ¶
Index ¶
- Constants
- func Compress(input []byte) []byte
- func Decompress(input []byte) []byte
- func FromByteSlice(bytes []byte) bitSlice
- func GetNextBit(bits bitSlice) (uint32, bitSlice)
- func NewReader(r io.Reader) io.Reader
- func NewWriter(w io.Writer) io.WriteCloser
- func PushBits(bits bitSlice, bit bool, pendingBits int) bitSlice
- func PushBitsPending(pendingBits int, bit bool) bitSlice
- type Model
- type Reader
- type Writer
Constants ¶
View Source
const ( MaxCode = 0xffff OneFourth = 0x4000 OneHalf = 2 * OneFourth ThreeFourths = 3 * OneFourth CodeValueBits = 16 MaxFreq = 16383 )
View Source
const BYTE_SIZE = 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
func FromByteSlice ¶
func FromByteSlice(bytes []byte) bitSlice
func GetNextBit ¶
func GetNextBit(bits bitSlice) (uint32, bitSlice)
func PushBitsPending ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.