function readVarInt(reader) {
  let result = 0
  let shift = 0
  while (true) {
    const byte = reader.view.getUint8(reader.offset++)
    result |= (byte & 0x7f) << shift
    if (!(byte & 0x80)) {
      return result
    }
    shift += 7
  }
}
Var int, also known as Unsigned LEB128.
Var ints take 1 to 5 bytes (int32) or 1 to 10 bytes (int64).
Reads groups of 7 low bits until high bit is 0.

@param {DataReader} reader
@returns {number}