code: public static void 
    setOutputCompressorClass(Job job, 
                             Class<? extends CompressionCodec> codecClass) {
      setCompressOutput(job, true);
      job.getConfiguration().setClass("mapred.output.compression.codec", 
                                      codecClass, 
                                      CompressionCodec.class);
    }
docs: Set the {@link CompressionCodec} to be used to compress job outputs.
  @param job the job to modify
  @param codecClass the {@link CompressionCodec} to be used to
  compress the job outputs