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.IOExceptionpublic BZip2OutputStream(java.io.OutputStream output,
int blockSize)
throws java.io.IOException
java.io.IOExceptionprivate 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.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int bv)
throws java.io.IOException
write in class java.io.OutputStreambv - Description of Parameterjava.io.IOException - Description of Exceptionprivate void allocateCompressStructures()
private void bsFinishedWithStream()
throws java.io.IOException
java.io.IOExceptionprivate void bsPutIntVS(int numBits,
int c)
throws java.io.IOException
java.io.IOExceptionprivate void bsPutUChar(int c)
throws java.io.IOException
java.io.IOExceptionprivate void bsPutint(int u)
throws java.io.IOException
java.io.IOExceptionprivate void bsSetStream(java.io.OutputStream f)
private void bsW(int n,
int v)
throws java.io.IOException
java.io.IOExceptionprivate void doReversibleTransformation()
private void endBlock()
throws java.io.IOException
java.io.IOExceptionprivate void endCompression()
throws java.io.IOException
java.io.IOExceptionprivate 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.IOExceptionprivate void mainSort()
private void makeMaps()
private char med3(char a,
char b,
char c)
private void moveToFrontCodeAndSend()
throws java.io.IOException
java.io.IOExceptionprivate void qSort3(int loSt,
int hiSt,
int dSt)
private void randomiseBlock()
private void sendMTFValues()
throws java.io.IOException
java.io.IOExceptionprivate 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