public static int getVarIntSize(int value) {
        int result = 0;
        do {
            result++;
            value >>>= 7;
        } while (value != 0);

        return result;
    }
Get varint length of given integer.

@param value integer
@return varint length
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseByteUtils.java