public class BZip2OutputStream extends java.io.OutputStream implements BZip2Constants
Modifier and Type | Class and Description |
---|---|
private static class |
BZip2OutputStream.StackElem |
Modifier and Type | Field and Description |
---|---|
private static int |
CLEARMASK |
private static int |
DEPTH_THRESH |
private static int |
GREATER_ICOST |
private static int |
LESSER_ICOST |
private static int |
LOWER_BYTE_MASK |
private int |
m_allowableBlockSize |
private char[] |
m_block |
private int |
m_blockCRC |
private boolean |
m_blockRandomised |
private int |
m_blockSize100k |
private int |
m_bsBuff |
private int |
m_bsLive |
private java.io.OutputStream |
m_bsStream |
private boolean |
m_closed |
private int |
m_combinedCRC |
private CRC |
m_crc |
private int |
m_currentChar |
private boolean |
m_firstAttempt |
private int[] |
m_ftab |
private int[] |
m_incs |
private boolean[] |
m_inUse |
private int |
m_last |
private int[] |
m_mtfFreq |
private int |
m_nInUse |
private int |
m_nMTF |
private int |
m_origPtr |
private int[] |
m_quadrant |
private int |
m_runLength |
private char[] |
m_selector |
private char[] |
m_selectorMtf |
private char[] |
m_seqToUnseq |
private short[] |
m_szptr |
private char[] |
m_unseqToSeq |
private int |
m_workDone |
private int |
m_workFactor |
private int |
m_workLimit |
private int[] |
m_zptr |
private static int |
QSORT_STACK_SIZE |
private static int |
SETMASK |
private static int |
SMALL_THRESH |
private static int |
UPPER_BYTE_MASK |
BASE_BLOCK_SIZE, G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, N_GROUPS, N_ITERS, NUM_OVERSHOOT_BYTES, RAND_NUMS, RUNA, RUNB
Constructor and Description |
---|
BZip2OutputStream(java.io.OutputStream output) |
BZip2OutputStream(java.io.OutputStream output,
int blockSize) |
Modifier and Type | Method and Description |
---|---|
private void |
allocateCompressStructures() |
private void |
bsFinishedWithStream() |
private void |
bsPutint(int u) |
private void |
bsPutIntVS(int numBits,
int c) |
private void |
bsPutUChar(int c) |
private void |
bsSetStream(java.io.OutputStream f) |
private void |
bsW(int n,
int v) |
private static int |
calculateWeight(int v1,
int v2) |
void |
close() |
private void |
doReversibleTransformation() |
private void |
endBlock() |
private void |
endCompression() |
protected void |
finalize() |
void |
flush() |
private boolean |
fullGtU(int i1,
int i2) |
private void |
generateMTFValues() |
private void |
hbAssignCodes(int[] code,
char[] length,
int minLen,
int maxLen,
int alphaSize) |
private static void |
hbMakeCodeLengths(char[] len,
int[] freq,
int alphaSize,
int maxLen) |
private void |
initBlock() |
private void |
initialize() |
private void |
mainSort() |
private void |
makeMaps() |
private char |
med3(char a,
char b,
char c) |
private void |
moveToFrontCodeAndSend() |
private static void |
panic() |
private void |
qSort3(int loSt,
int hiSt,
int dSt) |
private void |
randomiseBlock() |
private void |
sendMTFValues() |
private void |
simpleSort(int lo,
int hi,
int d) |
private void |
vswap(int p1,
int p2,
int n) |
void |
write(int bv)
modified by Oliver Merkel, 010128
|
private void |
writeRun() |
private static final int LOWER_BYTE_MASK
private static final int UPPER_BYTE_MASK
private static final int SETMASK
private static final int CLEARMASK
private static final int GREATER_ICOST
private static final int LESSER_ICOST
private static final int SMALL_THRESH
private static final int DEPTH_THRESH
private static final int QSORT_STACK_SIZE
private CRC m_crc
private boolean[] m_inUse
private char[] m_seqToUnseq
private char[] m_unseqToSeq
private char[] m_selector
private char[] m_selectorMtf
private int[] m_mtfFreq
private int m_currentChar
private int m_runLength
private boolean m_closed
private int[] m_incs
private boolean m_blockRandomised
private int m_blockSize100k
private int m_bsBuff
private int m_bsLive
private int m_last
private int m_origPtr
private int m_allowableBlockSize
private char[] m_block
private int m_blockCRC
private int m_combinedCRC
private java.io.OutputStream m_bsStream
private boolean m_firstAttempt
private int[] m_ftab
private int m_nInUse
private int m_nMTF
private int[] m_quadrant
private short[] m_szptr
private int m_workDone
private int m_workFactor
private int m_workLimit
private int[] m_zptr
public BZip2OutputStream(java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public BZip2OutputStream(java.io.OutputStream output, int blockSize) throws java.io.IOException
java.io.IOException
private static void hbMakeCodeLengths(char[] len, int[] freq, int alphaSize, int maxLen)
private static int calculateWeight(int v1, int v2)
private static void panic()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void write(int bv) throws java.io.IOException
write
in class java.io.OutputStream
bv
- Description of Parameterjava.io.IOException
- Description of Exceptionprivate void allocateCompressStructures()
private void bsFinishedWithStream() throws java.io.IOException
java.io.IOException
private void bsPutIntVS(int numBits, int c) throws java.io.IOException
java.io.IOException
private void bsPutUChar(int c) throws java.io.IOException
java.io.IOException
private void bsPutint(int u) throws java.io.IOException
java.io.IOException
private void bsSetStream(java.io.OutputStream f)
private void bsW(int n, int v) throws java.io.IOException
java.io.IOException
private void doReversibleTransformation()
private void endBlock() throws java.io.IOException
java.io.IOException
private void endCompression() throws java.io.IOException
java.io.IOException
private boolean fullGtU(int i1, int i2)
private void generateMTFValues()
private void hbAssignCodes(int[] code, char[] length, int minLen, int maxLen, int alphaSize)
private void initBlock()
private void initialize() throws java.io.IOException
java.io.IOException
private void mainSort()
private void makeMaps()
private char med3(char a, char b, char c)
private void moveToFrontCodeAndSend() throws java.io.IOException
java.io.IOException
private void qSort3(int loSt, int hiSt, int dSt)
private void randomiseBlock()
private void sendMTFValues() throws java.io.IOException
java.io.IOException
private void simpleSort(int lo, int hi, int d)
private void vswap(int p1, int p2, int n)
private void writeRun() throws java.io.IOException
java.io.IOException