compress
Class Arithmetic

java.lang.Object
  |
  +--compress.CompressAlgo
        |
        +--compress.Arithmetic

public class Arithmetic
extends CompressAlgo

Implements arithmetic compression.

Author:
Chad Cook

Field Summary
static Arithmetic Singleton
           
 
Constructor Summary
private Arithmetic()
           
 
Method Summary
 java.io.File decode(java.io.File fileIn)
          Decodes the given file.
 java.io.File encode(java.io.File fileIn)
          Encodes fileIn using Arithmetic coding and gives back the encoded file with a .cac attatched to the name.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

Singleton

public static final Arithmetic Singleton
Constructor Detail

Arithmetic

private Arithmetic()
Method Detail

encode

public java.io.File encode(java.io.File fileIn)
Encodes fileIn using Arithmetic coding and gives back the encoded file with a .cac attatched to the name.
Overrides:
encode in class CompressAlgo
Parameters:
File - The file to be encoded
Returns:
The encoded file.

decode

public java.io.File decode(java.io.File fileIn)
Description copied from class: CompressAlgo
Decodes the given file.
Overrides:
decode in class CompressAlgo
Following copied from class: compress.CompressAlgo
Parameters:
File - the file to be decoded.
Returns:
The decoded file.