public static long toInt64(byte[] bytes, int offset) {
        return ClickHouseByteUtils.getInt64(bytes, offset);
    }
Utility class for dealing with binary stream and data.
clickhouse-data/src/main/java/com/clickhouse/data/format/BinaryStreamUtils.java