java.lang.Object | +----com.theorem.compression.cacm87
For further discussion, see also
This algorithm was translated from the original C language code available at ftp://ftp.cpsc.ucalgary.ca/pub/projects/ar.cod
Most of the C code was left intact where possible, some minor optimizations were made, and wrapper methods added to enhance usefulness.
bytes
public byte[] byteArrayCompress(byte inData[],
int offset,
int length)
byte array of input
byte[] compressed byte array
public byte[] byteFileCompress(String fName)
bytes
file name of input
byte[] compressed byte array, or null
if something went wrong.
public boolean fileCompress(String fIn,
String fOut)
file name of input
file name of output
true[] if compression succeeded, false
if something failed in the process.
public byte[] byteArrayDecompress(byte inData[],
int offset,
int length)
byte array of compressed input
byte[] decompressed byte array
public byte[] byteFileDecompress(String fName)
byte array of decompressed input
public boolean fileDecompress(String fIn,
String fOut)
true if decompression worked., false
if anything failed.