public static void main(String[] args) throws IOException {
    if (args.length != 2 || args[0].equals("--help") || args[0].equals("-h")) {
      printHelp();
      System.exit(-1);
    }

    Path inputPath = new Path(args[0]);
    Path outputPath = new Path(args[1]);

    transformFile(inputPath, outputPath);
  }
Command line tool to compress and uncompress WALs.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/Compressor.java