class CompressionUtil {

    public static CompressionCodec getCodec(String name) {
        CompressionCodec codec = null;
        if (name == null)
            return null;
        try {
            codec = CompressionCodec.valueOf(name.toUpperCase(Locale.ENGLISH).trim());
        } catch (Exception e) {
        }
        return codec;
    }

}