All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jwat.tools.tasks.compress.CompressTaskCLI Maven / Gradle / Ivy

Go to download

JWAT-Tools uses the available JWAT libraries to make high level tasks available either from command-line or programmatically. Common tasks include: Test, Compress, Decompress, CDX, Arc2Warc. More specialised tasks include: Changed, ContainerMD, Delete, Extract, Interval, PathIndex, Unpack, Headers2CDX.

There is a newer version: 0.7.1
Show newest version
package org.jwat.tools.tasks.compress;

import org.jwat.tools.tasks.TaskCLI;

import com.antiaction.common.cli.CommandLine;

public class CompressTaskCLI extends TaskCLI {

	public static final String commandName = "compress";

	public static final String commandDescription = "compress ARC/WARC or plain file(s)";

	@Override
	public void show_help() {
		System.out.println("jwattools compress [-123456789] [--fast] [--best] [-w THREADS] ...");
		System.out.println("");
		System.out.println("compress one or more ARC/WARC/GZip files");
		System.out.println("");
		System.out.println("\tNormal files are compressed as a single GZip file.");
		System.out.println("\tARC/WARC files are compressed on a record level.");
		System.out.println("");
		System.out.println("options:");
		System.out.println("");
		System.out.println(" -1, --fast         compress faster, low compression ratio");
		System.out.println(" -9, --best         compesss better, high compression ratio");
		System.out.println(" -d, --destdir      destination directory of compressed files");
		System.out.println("     --dryrun       remove output file leaving the orignal in place");
		System.out.println("     --verify       decompress output file and compare against input file");
		System.out.println("     --remove       remove input file after compression (only on success)");
		System.out.println("     --listfile     list file of old/new filename, length and checksum");
		System.out.println("     --twopass      index file and then bitstream compress based on index");
		System.out.println("     --hdrfiles     write (W)ARC/HTTP headers to a seperate file for each input file");
		System.out.println("     --queue-first  queue files before processing");
		System.out.println(" -w              set the amount of worker thread(s) (defaults to 1)");
	}

	@Override
	public void runtask(CommandLine cmdLine) {
		CompressTask task = new CompressTask();
		task.runtask(CompressTaskCLIParser.parseArguments(cmdLine));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy