src/buffer-reader.js
// with top bit set to signify that another byte follows)
with top bit set to signify that another byte follows)
with top bit set to signify that another byte follows )
function readVarInt() {
    var result = 0;
    while (true) {
      var b = readInt8();
      if (b & 0x80) {
        result += (b & 0x7f);
        result <<= 7;
      } else {
        return result + b;
      }
    }
  }
function readVarInt ( ) { var result = 0 ; while ( true ) { var b = readInt8 ( ) ; if ( b & 0x80 ) { result += ( b & 0x7f ) ; result <<= 7 ; } else { return result + b ; } } }
with top bit set to signify that another byte follows)
with top bit set to signify that another byte follows )
/* b is the last byte */