Package gov.nih.mipav.model.file
Class CBZip2InputStream
java.lang.Object
java.io.InputStream
gov.nih.mipav.model.file.CBZip2InputStream
- All Implemented Interfaces:
BZip2Constants,Closeable,AutoCloseable
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
FieldsModifier and TypeFieldDescriptionprivate int[][]private booleanprivate intprivate intprivate intprivate InputStream(package private) int(package private) intprivate intprivate int(package private) intprivate intprivate int(package private) int(package private) intprivate boolean[](package private) intprivate intprivate int[][]private char[]private CRCprivate int[]private intprivate static final intprivate static final intprivate static final intprivate intprivate int[][]private static final intprivate static final intprivate static final int(package private) int(package private) intprivate char[]private char[]private char[]private static final intprivate intprivate intprivate boolean(package private) intprivate int[]private char[]private int[](package private) charFields inherited from interface gov.nih.mipav.model.file.BZip2Constants
baseBlockSize, G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, N_GROUPS, N_ITERS, NUM_OVERSHOOT_BYTES, rNums, RUNA, RUNB -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidprivate static voidprivate static voidprivate voidprivate intbsGetint()private intprivate intbsGetIntVS(int numBits) private charprivate intbsR(int n) private voidprivate static voidcadvise()private voidcomplete()private static voidprivate static voidcrcError()private voidendBlock()private voidprivate voidhbCreateDecodeTables(int[] limit, int[] base, int[] perm, char[] length, int minLen, int maxLen, int alphaSize) private voidprivate voidprivate voidmakeMaps()intread()private voidprivate voidsetDecompressStructureSizes(int newSize100k) private voidprivate voidprivate voidprivate voidprivate voidprivate voidprivate voidMethods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
last
private int last -
origPtr
private int origPtr -
blockSize100k
private int blockSize100k -
blockRandomised
private boolean blockRandomised -
bsBuff
private int bsBuff -
bsLive
private int bsLive -
mCrc
-
inUse
private boolean[] inUse -
nInUse
private int nInUse -
seqToUnseq
private char[] seqToUnseq -
unseqToSeq
private char[] unseqToSeq -
selector
private char[] selector -
selectorMtf
private char[] selectorMtf -
tt
private int[] tt -
ll8
private char[] ll8 -
unzftab
private int[] unzftab -
limit
private int[][] limit -
base
private int[][] base -
perm
private int[][] perm -
minLens
private int[] minLens -
bsStream
-
streamEnd
private boolean streamEnd -
currentChar
private int currentChar -
START_BLOCK_STATE
private static final int START_BLOCK_STATE- See Also:
-
RAND_PART_A_STATE
private static final int RAND_PART_A_STATE- See Also:
-
RAND_PART_B_STATE
private static final int RAND_PART_B_STATE- See Also:
-
RAND_PART_C_STATE
private static final int RAND_PART_C_STATE- See Also:
-
NO_RAND_PART_A_STATE
private static final int NO_RAND_PART_A_STATE- See Also:
-
NO_RAND_PART_B_STATE
private static final int NO_RAND_PART_B_STATE- See Also:
-
NO_RAND_PART_C_STATE
private static final int NO_RAND_PART_C_STATE- See Also:
-
currentState
private int currentState -
storedBlockCRC
private int storedBlockCRC -
storedCombinedCRC
private int storedCombinedCRC -
computedBlockCRC
private int computedBlockCRC -
computedCombinedCRC
private int computedCombinedCRC -
i2
int i2 -
count
int count -
chPrev
int chPrev -
ch2
int ch2 -
i
int i -
tPos
int tPos -
rNToGo
int rNToGo -
rTPos
int rTPos -
j2
int j2 -
z
char z
-
-
Constructor Details
-
CBZip2InputStream
-
-
Method Details
-
cadvise
private static void cadvise() -
badBGLengths
private static void badBGLengths() -
bitStreamEOF
private static void bitStreamEOF() -
compressedStreamEOF
private static void compressedStreamEOF() -
makeMaps
private void makeMaps() -
read
public int read()- Specified by:
readin classInputStream
-
initialize
private void initialize() -
initBlock
private void initBlock() -
endBlock
private void endBlock() -
complete
private void complete() -
blockOverrun
private static void blockOverrun() -
badBlockHeader
private static void badBlockHeader() -
crcError
private static void crcError() -
bsFinishedWithStream
private void bsFinishedWithStream() -
bsSetStream
-
bsR
private int bsR(int n) -
bsGetUChar
private char bsGetUChar() -
bsGetint
private int bsGetint() -
bsGetIntVS
private int bsGetIntVS(int numBits) -
bsGetInt32
private int bsGetInt32() -
hbCreateDecodeTables
private void hbCreateDecodeTables(int[] limit, int[] base, int[] perm, char[] length, int minLen, int maxLen, int alphaSize) -
recvDecodingTables
private void recvDecodingTables() -
getAndMoveToFrontDecode
private void getAndMoveToFrontDecode() -
setupBlock
private void setupBlock() -
setupRandPartA
private void setupRandPartA() -
setupNoRandPartA
private void setupNoRandPartA() -
setupRandPartB
private void setupRandPartB() -
setupRandPartC
private void setupRandPartC() -
setupNoRandPartB
private void setupNoRandPartB() -
setupNoRandPartC
private void setupNoRandPartC() -
setDecompressStructureSizes
private void setDecompressStructureSizes(int newSize100k)
-