code: private CodecFactory getCompressionCodec(Map<String, String> conf) {
  		if (getBoolean(conf, CONF_COMPRESS, false)) {
  			int deflateLevel = getInt(conf, CONF_DEFLATE_LEVEL, CodecFactory.DEFAULT_DEFLATE_LEVEL);
  			int xzLevel = getInt(conf, CONF_XZ_LEVEL, CodecFactory.DEFAULT_XZ_LEVEL);
  
  			String outputCodec = conf.get(CONF_COMPRESS_CODEC);
  
  			if (DataFileConstants.DEFLATE_CODEC.equals(outputCodec)) {
  				return CodecFactory.deflateCodec(deflateLevel);
  			} else if (DataFileConstants.XZ_CODEC.equals(outputCodec)) {
  				return CodecFactory.xzCodec(xzLevel);
  			} else {
  				return CodecFactory.fromString(outputCodec);
  			}
  		}
  		return CodecFactory.nullCodec();
  	}
docs: this derived from AvroOutputFormatBase.getCompressionCodec(..)