checkBit method Null safety
- int bit
Checks if bit
is set or not
Implementation
bool checkBit(int bit) {
bit = (_bitLength - bit) - 1;
var thisByte = bit ~/ 8;
var thisBit = bit % 8;
return (_stream[thisByte] & (1 << (7 - thisBit))) != 0;
}