Documentation
¶
Index ¶
- Variables
- func AndBitmapsCount(a, b []byte) int
- func AndBitmapsNonZero(a, b []byte) bool
- func BitmapFillRect(bits []byte, width, x, y, w, h int)
- func DecodeOnoff(enc []byte, out []byte) (int, error)
- func DecodeOnoff3(enc []byte, out []byte) (int, error)
- func EncodeOnoff(bits []byte, out []byte) (int, error)
- func EncodeOnoff3(bits []byte, out []byte) (int, error)
- func MaxEncodedBytes(inputBitCount int) int
Constants ¶
This section is empty.
Variables ¶
var ErrOutOfSpace = errors.New("out of buffer space")
Functions ¶
func AndBitmapsCount ¶
Compute the binary AND of the bitmaps 'a' and 'b', and return the number of 'on' bits.
func AndBitmapsNonZero ¶
Compute the binary AND of the bitmaps 'a' and 'b', and return true if any bits are set
func BitmapFillRect ¶
Fill a bitmap with a rectangle of 'on' bits. The bitmap's width must be a multiple of 8
func DecodeOnoff ¶
Returns the number of BITS decoded. Returns ErrOutOfSpace if the decoded bit stream is larger than 'out'
func DecodeOnoff3 ¶
Returns the number of BITS decoded. Returns ErrOutOfSpace if the decoded bit stream is larger than 'out'. Note that DecodeOnoff is a wrapper around this function.
func EncodeOnoff ¶
Encode the given bit stream using our on/off encoding. Returns the number of bytes written into 'out'. If the resulting bit stream ends up being larger than 'out', then abort and return ErrOutOfSpace.
func EncodeOnoff3 ¶
Final version Note that EncodeOnoff is a wrapper around this function.
func MaxEncodedBytes ¶
Return the maximum number of bytes required to encode an input of the given bit length
Types ¶
This section is empty.