List of utility methods to do Bit Get
int | getBit(byte[] bytes, int bitNr) Get the given bit in the encoded bytes. int byteNr = bytes.length - (bitNr / 8) - 1; int bitNrInByte = bitNr % 8; return bytes[byteNr] >>> bitNrInByte & 1; |
int | getMostSignificantBit(byte b) get Most Significant Bit return b >> 7 & 0x1;
|