writeVarUint = (encoder, num) => {
  while (num > binary.BITS7) {
    write(encoder, binary.BIT8 | binary.BITS7 & num);
    num >>>= 7;
  }

  write(encoder, binary.BITS7 & num);
}
Write a variable length unsigned integer.

Encodes integers in the range from [0, 4294967295] / [0, 0xffffffff]. (max 32 bit unsigned integer)

@function
@param {Encoder} encoder
@param {number} num The number that is to be encoded.