code: function parseVarInt(cursor) {
      var result = 0, byte;
  
      do {
          byte = cursor.readUInt8();
  
          result <<= 7;
          result |= byte & 0x7F;
      } while (byte & 0x80);
  
      return result;
  }
docs: Parse a variable-length integer
  (up to 4 bytes in big-endian order, if
  the MSB is set, it means another byte is following).
  
  @private
  @param {module:buffercursor} cursor Buffer to read
  @return {number} Parsed integer