public static CompressionCodec getGzipCodec(Configuration conf) {
    try {
      return (CompressionCodec) ReflectionUtils
        .newInstance(conf.getClassByName("org.apache.hadoop.io.compress.GzipCodec")
          .asSubclass(CompressionCodec.class), conf);
    } catch (ClassNotFoundException e) {
      logger.warn("GzipCodec could not be instantiated", e);
      return null;
    }
  }
Instantiates a Hadoop codec for compressing and decompressing Gzip files. This is the most
common compression applied to WARC files.
@param conf The Hadoop configuration.
hbase-it/src/test/java/org/apache/hadoop/hbase/test/util/warc/WARCFileWriter.java