Documentation
¶
Overview ¶
Package bitutil implements fast bitwise operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ANDBytes ¶
ANDBytes ands the bytes in a and b. The destination is assumed to have enough space. Returns the number of bytes and'd.
func CompressBytes ¶
CompressBytes compresses the input byte slice according to the sparse bitset representation algorithm. If the result is bigger than the original input, no compression is done.
func DecompressBytes ¶
DecompressBytes decompresses data with a known target size. If the input data matches the size of the target, it means no compression was done in the first place.
func ORBytes ¶
ORBytes ors the bytes in a and b. The destination is assumed to have enough space. Returns the number of bytes or'd.
func XORBytes
deprecated
XORBytes xors the bytes in a and b. The destination is assumed to have enough space. Returns the number of bytes xor'd.
If dst does not have length at least n, XORBytes panics without writing anything to dst.
dst and x or y may overlap exactly or not at all, otherwise XORBytes may panic.
Deprecated: use crypto/subtle.XORBytes
Types ¶
This section is empty.