readLeb128UnsignedInt method

int readLeb128UnsignedInt()

Reads a LEB128 unsigned integer.

Implementation

int readLeb128UnsignedInt() {
  var result = 0;
  var shift = 0;

  while (true) {
    var byte = readByte();
    result |= _platform.shiftLeftInt((byte & 0x7F), shift);
    if ((byte & 0x80) == 0) break;
    shift += 7;
  }

  return result;
}