writeBits method
Implementation
@override
void writeBits(int value, int bits) {
if (bits < getBitsNeeded(value.abs())) {
throw Exception(
"Value $value is too large for $bits bits. You would need ${getBitsNeeded(value.abs())} bits to write $value. (or write up to ${pow(2, bits) - 1}) bits");
}
_i(bits);
}