Package net.sf.jazzlib
Class DeflaterHuffman
- java.lang.Object
-
- net.sf.jazzlib.DeflaterHuffman
-
class DeflaterHuffman extends java.lang.ObjectThis is the DeflaterHuffman class. This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classDeflaterHuffman.Tree
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Stringbit4Reverseprivate static intBITLEN_NUMprivate static int[]BL_ORDERprivate DeflaterHuffman.TreeblTreeprivate static intBUFSIZEprivate short[]d_bufprivate static intDIST_NUMprivate DeflaterHuffman.TreedistTreeprivate static intEOF_SYMBOLprivate intextra_bitsprivate byte[]l_bufprivate intlast_litprivate static intLITERAL_NUMprivate DeflaterHuffman.TreeliteralTree(package private) DeflaterPendingpendingprivate static intREP_11_138private static intREP_3_10private static intREP_3_6private static short[]staticDCodesprivate static byte[]staticDLengthprivate static short[]staticLCodesprivate static byte[]staticLLength
-
Constructor Summary
Constructors Constructor Description DeflaterHuffman(DeflaterPending pending)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static shortbitReverse(int value)Reverse the bits of a 16 bit value.voidcompressBlock()private intd_code(int distance)voidflushBlock(byte[] stored, int stored_offset, int stored_len, boolean lastBlock)voidflushStoredBlock(byte[] stored, int stored_offset, int stored_len, boolean lastBlock)booleanisFull()private intl_code(int len)voidreset()voidsendAllTrees(int blTreeCodes)booleantallyDist(int dist, int len)booleantallyLit(int lit)
-
-
-
Field Detail
-
BUFSIZE
private static final int BUFSIZE
- See Also:
- Constant Field Values
-
LITERAL_NUM
private static final int LITERAL_NUM
- See Also:
- Constant Field Values
-
DIST_NUM
private static final int DIST_NUM
- See Also:
- Constant Field Values
-
BITLEN_NUM
private static final int BITLEN_NUM
- See Also:
- Constant Field Values
-
REP_3_6
private static final int REP_3_6
- See Also:
- Constant Field Values
-
REP_3_10
private static final int REP_3_10
- See Also:
- Constant Field Values
-
REP_11_138
private static final int REP_11_138
- See Also:
- Constant Field Values
-
EOF_SYMBOL
private static final int EOF_SYMBOL
- See Also:
- Constant Field Values
-
BL_ORDER
private static final int[] BL_ORDER
-
bit4Reverse
private static final java.lang.String bit4Reverse
- See Also:
- Constant Field Values
-
pending
DeflaterPending pending
-
literalTree
private final DeflaterHuffman.Tree literalTree
-
distTree
private final DeflaterHuffman.Tree distTree
-
blTree
private final DeflaterHuffman.Tree blTree
-
d_buf
private final short[] d_buf
-
l_buf
private final byte[] l_buf
-
last_lit
private int last_lit
-
extra_bits
private int extra_bits
-
staticLCodes
private static short[] staticLCodes
-
staticLLength
private static byte[] staticLLength
-
staticDCodes
private static short[] staticDCodes
-
staticDLength
private static byte[] staticDLength
-
-
Constructor Detail
-
DeflaterHuffman
public DeflaterHuffman(DeflaterPending pending)
-
-
Method Detail
-
bitReverse
static short bitReverse(int value)
Reverse the bits of a 16 bit value.
-
reset
public final void reset()
-
l_code
private final int l_code(int len)
-
d_code
private final int d_code(int distance)
-
sendAllTrees
public void sendAllTrees(int blTreeCodes)
-
compressBlock
public void compressBlock()
-
flushStoredBlock
public void flushStoredBlock(byte[] stored, int stored_offset, int stored_len, boolean lastBlock)
-
flushBlock
public void flushBlock(byte[] stored, int stored_offset, int stored_len, boolean lastBlock)
-
isFull
public final boolean isFull()
-
tallyLit
public final boolean tallyLit(int lit)
-
tallyDist
public final boolean tallyDist(int dist, int len)
-
-