org.apache.commons.compress.compressors.bzip2
Class BZip2InputStream
java.lang.Object
java.io.InputStream
org.apache.commons.compress.compressors.bzip2.BZip2InputStream
- All Implemented Interfaces:
- java.io.Closeable, BZip2Constants
public class BZip2InputStream
- extends java.io.InputStream
- implements BZip2Constants
An input stream that decompresses from the BZip2 format (without the file
header chars) to be read as any other stream.
- Author:
- Keiron Liddle
Fields inherited from interface org.apache.commons.compress.compressors.bzip2.BZip2Constants |
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 Summary |
BZip2InputStream(java.io.InputStream input)
Initializes ein CBZip2 InputStream with the give
InputStream |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
START_BLOCK_STATE
private static final int START_BLOCK_STATE
- See Also:
- Constant Field Values
RAND_PART_A_STATE
private static final int RAND_PART_A_STATE
- See Also:
- Constant Field Values
RAND_PART_B_STATE
private static final int RAND_PART_B_STATE
- See Also:
- Constant Field Values
RAND_PART_C_STATE
private static final int RAND_PART_C_STATE
- See Also:
- Constant Field Values
NO_RAND_PART_A_STATE
private static final int NO_RAND_PART_A_STATE
- See Also:
- Constant Field Values
NO_RAND_PART_B_STATE
private static final int NO_RAND_PART_B_STATE
- See Also:
- Constant Field Values
NO_RAND_PART_C_STATE
private static final int NO_RAND_PART_C_STATE
- See Also:
- Constant Field Values
m_crc
private CRC m_crc
m_inUse
private boolean[] m_inUse
m_seqToUnseq
private char[] m_seqToUnseq
m_unseqToSeq
private char[] m_unseqToSeq
m_selector
private char[] m_selector
m_selectorMtf
private char[] m_selectorMtf
m_unzftab
private int[] m_unzftab
m_limit
private int[][] m_limit
m_base
private int[][] m_base
m_perm
private int[][] m_perm
m_minLens
private int[] m_minLens
m_streamEnd
private boolean m_streamEnd
m_currentChar
private int m_currentChar
m_currentState
private int m_currentState
m_rNToGo
private int m_rNToGo
m_rTPos
private int m_rTPos
m_tPos
private int m_tPos
i2
private int i2
count
private int count
chPrev
private int chPrev
ch2
private int ch2
j2
private int j2
z
private char z
m_blockRandomised
private boolean m_blockRandomised
m_blockSize100k
private int m_blockSize100k
m_bsBuff
private int m_bsBuff
m_bsLive
private int m_bsLive
m_input
private java.io.InputStream m_input
m_computedBlockCRC
private int m_computedBlockCRC
m_computedCombinedCRC
private int m_computedCombinedCRC
m_last
private int m_last
m_ll8
private char[] m_ll8
m_nInUse
private int m_nInUse
m_origPtr
private int m_origPtr
m_storedBlockCRC
private int m_storedBlockCRC
m_storedCombinedCRC
private int m_storedCombinedCRC
m_tt
private int[] m_tt
BZip2InputStream
public BZip2InputStream(java.io.InputStream input)
- Initializes ein CBZip2 InputStream with the give
InputStream
- Parameters:
input
- the InputStream to initialize with
badBlockHeader
private static void badBlockHeader()
blockOverrun
private static void blockOverrun()
cadvise
private static void cadvise()
compressedStreamEOF
private static void compressedStreamEOF()
crcError
private static void crcError()
read
public int read()
- Specified by:
read
in class java.io.InputStream
setDecompressStructureSizes
private void setDecompressStructureSizes(int newSize100k)
setupBlock
private void setupBlock()
setupNoRandPartA
private void setupNoRandPartA()
setupNoRandPartB
private void setupNoRandPartB()
setupNoRandPartC
private void setupNoRandPartC()
setupRandPartA
private void setupRandPartA()
setupRandPartB
private void setupRandPartB()
setupRandPartC
private void setupRandPartC()
getAndMoveToFrontDecode
private void getAndMoveToFrontDecode()
bsFinishedWithStream
private void bsFinishedWithStream()
readVariableSizedInt
private int readVariableSizedInt(int numBits)
readUnsignedChar
private char readUnsignedChar()
readInt
private int readInt()
bsR
private int bsR(int n)
bsSetStream
private void bsSetStream(java.io.InputStream input)
complete
private void complete()
endBlock
private void endBlock()
hbCreateDecodeTables
private void hbCreateDecodeTables(int[] limit,
int[] base,
int[] perm,
char[] length,
int minLen,
int maxLen,
int alphaSize)
initBlock
private void initBlock()
initialize
private void initialize()
makeMaps
private void makeMaps()
recvDecodingTables
private void recvDecodingTables()
buildInUseTable
private void buildInUseTable()
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException