org.apache.commons.compress.compressors.bzip2

Class BZip2InputStream

public class BZip2InputStream extends 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

Field Summary
intch2
intchPrev
intcount
inti2
intj2
int[][]m_base
booleanm_blockRandomised
intm_blockSize100k
intm_bsBuff
intm_bsLive
intm_computedBlockCRC
intm_computedCombinedCRC
CRCm_crc
intm_currentChar
intm_currentState
InputStreamm_input
boolean[]m_inUse
intm_last
int[][]m_limit
char[]m_ll8
int[]m_minLens
intm_nInUse
intm_origPtr
int[][]m_perm
intm_rNToGo
intm_rTPos
char[]m_selector
char[]m_selectorMtf
char[]m_seqToUnseq
intm_storedBlockCRC
intm_storedCombinedCRC
booleanm_streamEnd
intm_tPos
int[]m_tt
char[]m_unseqToSeq
int[]m_unzftab
static intNO_RAND_PART_A_STATE
static intNO_RAND_PART_B_STATE
static intNO_RAND_PART_C_STATE
static intRAND_PART_A_STATE
static intRAND_PART_B_STATE
static intRAND_PART_C_STATE
static intSTART_BLOCK_STATE
charz
Constructor Summary
BZip2InputStream(InputStream input)
Initializes ein CBZip2 InputStream with the give InputStream
Method Summary
static voidbadBlockHeader()
static voidblockOverrun()
voidbsFinishedWithStream()
intbsR(int n)
voidbsSetStream(InputStream input)
voidbuildInUseTable()
static voidcadvise()
voidclose()
voidcomplete()
static voidcompressedStreamEOF()
static voidcrcError()
voidendBlock()
voidgetAndMoveToFrontDecode()
voidhbCreateDecodeTables(int[] limit, int[] base, int[] perm, char[] length, int minLen, int maxLen, int alphaSize)
voidinitBlock()
voidinitialize()
voidmakeMaps()
intread()
intreadInt()
charreadUnsignedChar()
intreadVariableSizedInt(int numBits)
voidrecvDecodingTables()
voidsetDecompressStructureSizes(int newSize100k)
voidsetupBlock()
voidsetupNoRandPartA()
voidsetupNoRandPartB()
voidsetupNoRandPartC()
voidsetupRandPartA()
voidsetupRandPartB()
voidsetupRandPartC()

Field Detail

ch2

private int ch2

chPrev

private int chPrev

count

private int count

i2

private int i2

j2

private int j2

m_base

private int[][] m_base

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_computedBlockCRC

private int m_computedBlockCRC

m_computedCombinedCRC

private int m_computedCombinedCRC

m_crc

private CRC m_crc

m_currentChar

private int m_currentChar

m_currentState

private int m_currentState

m_input

private InputStream m_input

m_inUse

private boolean[] m_inUse

m_last

private int m_last

m_limit

private int[][] m_limit

m_ll8

private char[] m_ll8

m_minLens

private int[] m_minLens

m_nInUse

private int m_nInUse

m_origPtr

private int m_origPtr

m_perm

private int[][] m_perm

m_rNToGo

private int m_rNToGo

m_rTPos

private int m_rTPos

m_selector

private char[] m_selector

m_selectorMtf

private char[] m_selectorMtf

m_seqToUnseq

private char[] m_seqToUnseq

m_storedBlockCRC

private int m_storedBlockCRC

m_storedCombinedCRC

private int m_storedCombinedCRC

m_streamEnd

private boolean m_streamEnd

m_tPos

private int m_tPos

m_tt

private int[] m_tt

m_unseqToSeq

private char[] m_unseqToSeq

m_unzftab

private int[] m_unzftab

NO_RAND_PART_A_STATE

private static final int NO_RAND_PART_A_STATE

NO_RAND_PART_B_STATE

private static final int NO_RAND_PART_B_STATE

NO_RAND_PART_C_STATE

private static final int NO_RAND_PART_C_STATE

RAND_PART_A_STATE

private static final int RAND_PART_A_STATE

RAND_PART_B_STATE

private static final int RAND_PART_B_STATE

RAND_PART_C_STATE

private static final int RAND_PART_C_STATE

START_BLOCK_STATE

private static final int START_BLOCK_STATE

z

private char z

Constructor Detail

BZip2InputStream

public BZip2InputStream(InputStream input)
Initializes ein CBZip2 InputStream with the give InputStream

Parameters: input the InputStream to initialize with

Method Detail

badBlockHeader

private static void badBlockHeader()

blockOverrun

private static void blockOverrun()

bsFinishedWithStream

private void bsFinishedWithStream()

bsR

private int bsR(int n)

bsSetStream

private void bsSetStream(InputStream input)

buildInUseTable

private void buildInUseTable()

cadvise

private static void cadvise()

close

public void close()

complete

private void complete()

compressedStreamEOF

private static void compressedStreamEOF()

crcError

private static void crcError()

endBlock

private void endBlock()

getAndMoveToFrontDecode

private void getAndMoveToFrontDecode()

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()

read

public int read()

readInt

private int readInt()

readUnsignedChar

private char readUnsignedChar()

readVariableSizedInt

private int readVariableSizedInt(int numBits)

recvDecodingTables

private void recvDecodingTables()

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()