Helper class for working with bits
Static methods
staticinlineflipDWORD (x:Int):Int
Flips the bytes within the DWORD x
(4 bytes) to convert between little endian and big endian format.
staticinlineflipWORD (x:Int):Int
Flips the bytes within the WORD x
(2 bytes) to convert between little endian and big endian format.
staticntz (x:Int):Int
Counts the number of trailing 0's in x
. For example 0b10000 has 4 trailing 0's.
staticinlineswap (x:Int, i:Int, j:Int):Int
Swaps the bit at index i
with the bit at index j
in the bit field x
(LSB=0).