pt.tumba.ngram.compression
Class PPMCompress

java.lang.Object
  extended by pt.tumba.ngram.compression.PPMCompress

public final class PPMCompress
extends java.lang.Object

Command-line function for compressing files or streams.

Usage:
java PPMCompress [Order [FileIn [FileOut]]]
   Order : Order of PPM model to use.
   FileIn : File to compress. If not specified, uses stdin.
   FileOut : Name of file into which to write the compressed output. Directory must exist. If not specified, writes to stdout.

For example, java PPMCompress 5 foo foo.ppm uses order 5 compression to compress file foo to file foo.ppm. proc1 | PPMCompress 8 | proc2 takes input from the standard out of proc1 and sends the compressed stream to proc2.

Author:
Bruno Martins
See Also:
PPMDecompress

Field Summary
private static java.lang.String USAGE_MESSAGE
          String detailing usage of class as a main.
 
Constructor Summary
PPMCompress()
           
 
Method Summary
static void main(java.lang.String[] args)
          Compress according to the command line specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USAGE_MESSAGE

private static java.lang.String USAGE_MESSAGE
String detailing usage of class as a main.

Constructor Detail

PPMCompress

public PPMCompress()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Compress according to the command line specification. See class documentation for description.

Parameters:
args - The command line input, tokenized.
Throws:
java.io.IOException - If there is an underlying IO exception.