Top Fields Constructors Methods
org.tukaani.xz.rangecoder

public abstract Class RangeEncoder

extends RangeCoder
Class Inheritance
Known Direct Subclasses
org.tukaani.xz.rangecoder.RangeEncoderToBuffer, org.tukaani.xz.rangecoder.RangeEncoderToStream
Imports
java.io.IOException

Field Summary

Modifier and TypeField and Description
private static final int
private byte
pack-priv long
private long
private static final int
private static final int[]
private int
Inherited from org.tukaani.xz.rangecoder.RangeCoder:
BIT_MODEL_TOTALBIT_MODEL_TOTAL_BITSMOVE_BITSPROB_INITSHIFT_BITSTOP_MASK

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
encodeBit(short[] probs, int index, int bit)

public void
encodeBitTree(short[] probs, int symbol)

public void
encodeDirectBits(int value, int count)

public void
encodeReverseBitTree(short[] probs, int symbol)

public int
public static int
getBitPrice(int prob, int bit)

public static int
getBitTreePrice(short[] probs, int symbol)

public static int
getDirectBitsPrice(int count)

public int
public static int
getReverseBitTreePrice(short[] probs, int symbol)

public void
private void
pack-priv abstract void
writeByte(int b)

Inherited from org.tukaani.xz.rangecoder.RangeCoder:
initProbs

Field Detail

BIT_PRICE_SHIFT_BITSback to summary
private static final int BIT_PRICE_SHIFT_BITS
cacheback to summary
private byte cache
cacheSizeback to summary
pack-priv long cacheSize
lowback to summary
private long low
MOVE_REDUCING_BITSback to summary
private static final int MOVE_REDUCING_BITS
pricesback to summary
private static final int[] prices
rangeback to summary
private int range

Constructor Detail

RangeEncoderback to summary
public RangeEncoder()

Method Detail

encodeBitback to summary
public void encodeBit(short[] probs, int index, int bit) throws IOException
encodeBitTreeback to summary
public void encodeBitTree(short[] probs, int symbol) throws IOException
encodeDirectBitsback to summary
public void encodeDirectBits(int value, int count) throws IOException
encodeReverseBitTreeback to summary
public void encodeReverseBitTree(short[] probs, int symbol) throws IOException
finishback to summary
public int finish() throws IOException
getBitPriceback to summary
public static int getBitPrice(int prob, int bit)
getBitTreePriceback to summary
public static int getBitTreePrice(short[] probs, int symbol)
getDirectBitsPriceback to summary
public static int getDirectBitsPrice(int count)
getPendingSizeback to summary
public int getPendingSize()
getReverseBitTreePriceback to summary
public static int getReverseBitTreePrice(short[] probs, int symbol)
resetback to summary
public void reset()
shiftLowback to summary
private void shiftLow() throws IOException
writeByteback to summary
pack-priv abstract void writeByte(int b) throws IOException