put method

void put(
  1. int number,
  2. int length
)

Implementation

void put(int number, int length) {
  for (var i = 0; i < length; i++) {
    final bit = ((number >> (length - i - 1)) & 1) == 1;
    putBit(bit);
  }
}