protected static int read7BitEncodedInt(BinBuffer binb) {
	    int result = 0, bitsRead = 0;
	    while (true) {
	    	int value = binb.readByte();
	    	result += (value%128) << bitsRead;
	    	bitsRead += 7;
	    	if (result <= 127) return result;
	    }
	}