private static void transformFile(Path input, Path output) throws IOException {
    Configuration conf = HBaseConfiguration.create();

    FileSystem inFS = input.getFileSystem(conf);
    FileSystem outFS = output.getFileSystem(conf);

    WALStreamReader in = WALFactory.createStreamReader(inFS, input, conf);
    WALProvider.Writer out = null;

    try {
      if (!(in instanceof AbstractProtobufWALReader)) {
        System.err.println("Cannot proceed, invalid reader type: " + in.getClass().getName());
        return;
      }
      boolean compress = ((AbstractProtobufWALReader) in).hasCompression;
      conf.setBoolean(HConstants.ENABLE_WAL_COMPRESSION, !compress);
      out = WALFactory.createWALWriter(outFS, output, conf);

      WAL.Entry e = null;
      while ((e = in.next()) != null) {
        out.append(e);
      }
    } finally {
      in.close();
      if (out != null) {
        out.close();
        out = null;
      }
    }
  }
Command line tool to compress and uncompress WALs.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/Compressor.java