public static ClickHouseCompression fromEncoding(String encoding) {
        ClickHouseCompression compression = NONE;

        if (encoding != null) {
            for (ClickHouseCompression c : values()) {
                if (c.encoding.equals(encoding)) {
                    compression = c;
                    break;
                }
            }
        }

        return compression;
    }
Get compression algorithm based on given encoding.

@param encoding content encoding
@return compression algorithm
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseCompression.java