com.colloquial.arithcode
Class ArithCoder

java.lang.Object
  |
  +--com.colloquial.arithcode.ArithCoder
Direct Known Subclasses:
ArithDecoder, ArithEncoder

class ArithCoder
extends java.lang.Object

A generic arithmetic coding subclass containing elements common to both arithmetic decoding and arithmetic coding.

Since:
1.0
Version:
1.1
Author:
Bob Carpenter

Field Summary
protected  long _high
          The high bound on the current interval for coding.
protected  long _low
          The low bound on the current interval for coding.
protected static int CODE_VALUE_BITS
          Precision of coding, expressed in number of bits used for arithmetic before shifting out partial results.
protected static long FIRST_QUARTER
          1/4 of the largest possible value plus one.
protected static long HALF
          1/2 of the largest possible value; 2 * FIRST_QUARTER
protected static long THIRD_QUARTER
          3/4 of the largest possible value; 3 * FIRST_QUARTER
protected static long TOP_VALUE
          The largest possible interval value.
 
Constructor Summary
protected ArithCoder()
          Construct a generic arithmetic coder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_low

protected long _low
The low bound on the current interval for coding. Initialized to zero.


_high

protected long _high
The high bound on the current interval for coding. Initialized to top value possible.


CODE_VALUE_BITS

protected static final int CODE_VALUE_BITS
Precision of coding, expressed in number of bits used for arithmetic before shifting out partial results.

See Also:
Constant Field Values

TOP_VALUE

protected static final long TOP_VALUE
The largest possible interval value. All 1s.

See Also:
Constant Field Values

FIRST_QUARTER

protected static final long FIRST_QUARTER
1/4 of the largest possible value plus one.

See Also:
Constant Field Values

HALF

protected static final long HALF
1/2 of the largest possible value; 2 * FIRST_QUARTER

See Also:
Constant Field Values

THIRD_QUARTER

protected static final long THIRD_QUARTER
3/4 of the largest possible value; 3 * FIRST_QUARTER

See Also:
Constant Field Values
Constructor Detail

ArithCoder

protected ArithCoder()
Construct a generic arithmetic coder.