Class DecompressArithmetic

java.lang.Object
  |
  +--DecompressArithmetic

public class DecompressArithmetic
extends java.lang.Object

DecompressArithmetic.java

Mark Nelson
March 8, 1996
http://web2.airmail.net/markn
**** moded by David Scott in May of 2001 to make bijective
Ported to Java by Tim Tyler, July 2001 - http://mandala.co.uk/biac/

DESCRIPTION
-----------

This program performs an order-0 adaptive arithmetic decoding function on an input file/stream, and sends the result to an output file or stream.

This program contains the source code from the 1987 CACM article by Witten, Neal, and Cleary. I have taken the source modules and combined them into this single file for ease of distribution and compilation. Other than that, the code is essentially unchanged.

This program takes two arguments: an input file and an output file. You can leave off one argument and send your output to stdout. Leave off two arguments and read your input from stdin as well.

This program accompanies my article "Data Compression with the Burrows-Wheeler Transform."

Build Instructions
------------------

Define the constant unix for UNIX or UNIX-like systems. The use of this constant turns off the code used to force the MS-DOS file system into binary mode. g++ does this already, your UNIX C++ compiler might also.

Borland C++ 4.5 16 bit : bcc -w unari.cpp
Borland C++ 4.5 32 bit : bcc32 -w unari.cpp
Microsoft Visual C++ 1.52 : cl /W4 unari.cpp
Microsoft Visual C++ 2.1 : cl /W4 unari.cpp
g++ : g++ -o unari unari.cpp

Typical Use
-----------

unari < compressed-file | unrle | unmtf | unbwt | unrle > raw-file


Constructor Summary
DecompressArithmetic()
           
 
Method Summary
 void decompress(java.lang.String input_file, java.lang.String output_file)
          Decompresses input_file and stores the results in output_file
static void main(java.lang.String[] args)
          Handles the Commmand-line interface to the compressor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecompressArithmetic

public DecompressArithmetic()
Method Detail

decompress

public void decompress(java.lang.String input_file,
                       java.lang.String output_file)
                throws java.io.IOException
Decompresses input_file and stores the results in output_file


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Handles the Commmand-line interface to the compressor