getInt method
int value with the bit length
get the bit with length
, and then covert bits to int value.
Implementation
int getInt(int length) {
var value =
int.parse(_bitData.substring(_index, _index + length), radix: 2);
_index = _index + length;
return value;
}