private void complete() throws IOException { this.storedCombinedCRC = bsGetInt(); this.currentState = EOF; this.data = null; if (this.storedCombinedCRC != this.computedCombinedCRC) { reportCRCError(); } }
private boolean bsGetBit() throws IOException { return bsR(1) != 0; }
private void setupNoRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suCh2 = suCh2Shadow; this.suTPos = this.data.tt[this.suTPos]; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); setupBlock(); } }
CBZip2InputStream bzip = new CBZip2InputStream(bais); pixels = new byte[planeSize]; bzip.read(pixels, 0, pixels.length); tempPixels = null; bais.close(); bzip.close(); bais = null; bzip = null;
private void initBlock() throws IOException { char magic0 = bsGetUByte(); char magic1 = bsGetUByte(); char magic2 = bsGetUByte(); char magic3 = bsGetUByte(); char magic4 = bsGetUByte(); char magic5 = bsGetUByte(); magic5 == 0x90) complete(); // end of file this.storedBlockCRC = bsGetInt(); this.blockRandomised = bsR(1) == 1; getAndMoveToFrontDecode();
if (bsGetBit()) { inUse16 |= 1 << i; final int i16 = i << 4; for (int j = 0; j < 16; j++) { if (bsGetBit()) inUse[i16 + j] = true; makeMaps(); final int alphaSize = this.nInUse + 2; final int nGroups = bsR(3); final int nSelectors = bsR(15); while (bsGetBit()) j++; selectorMtf[i] = (byte) j; int curr = bsR(5); final char[] tLen = len[t]; for (int i = 0; i < alphaSize; i++) { while (bsGetBit()) curr += bsGetBit() ? -1 : 1; tLen[i] = (char) curr; createHuffmanDecodingTables(alphaSize, nGroups);
private void getAndMoveToFrontDecode() throws IOException { this.origPtr = bsR(24); recvDecodingTables(); int groupPos = G_SIZE - 1; final int eob = this.nInUse + 1; int nextSym = getAndMoveToFrontDecode0(0); int bsBuffShadow = this.bsBuff; int bsLiveShadow = this.bsLive;
@Override protected void resetStream() throws IOException { BufferedInputStream bis = new BufferedInputStream( new FileInputStream(file), RandomAccessInputStream.MAX_OVERHEAD); int skipped = 0; while (skipped < 2) { skipped += bis.skip(2 - skipped); } stream = new DataInputStream(new CBZip2InputStream(bis)); }
CBZip2InputStream bzip = new CBZip2InputStream(bais); pixels = new byte[planeSize]; bzip.read(pixels, 0, pixels.length); tempPixels = null; bais.close(); bzip.close(); bais = null; bzip = null;
private void initBlock() throws IOException { char magic0 = bsGetUByte(); char magic1 = bsGetUByte(); char magic2 = bsGetUByte(); char magic3 = bsGetUByte(); char magic4 = bsGetUByte(); char magic5 = bsGetUByte(); magic5 == 0x90) complete(); // end of file this.storedBlockCRC = bsGetInt(); this.blockRandomised = bsR(1) == 1; getAndMoveToFrontDecode();
if (bsGetBit()) { inUse16 |= 1 << i; final int i16 = i << 4; for (int j = 0; j < 16; j++) { if (bsGetBit()) inUse[i16 + j] = true; makeMaps(); final int alphaSize = this.nInUse + 2; final int nGroups = bsR(3); final int nSelectors = bsR(15); while (bsGetBit()) j++; selectorMtf[i] = (byte) j; int curr = bsR(5); final char[] tLen = len[t]; for (int i = 0; i < alphaSize; i++) { while (bsGetBit()) curr += bsGetBit() ? -1 : 1; tLen[i] = (char) curr; createHuffmanDecodingTables(alphaSize, nGroups);
private void getAndMoveToFrontDecode() throws IOException { this.origPtr = bsR(24); recvDecodingTables(); int groupPos = G_SIZE - 1; final int eob = this.nInUse + 1; int nextSym = getAndMoveToFrontDecode0(0); int bsBuffShadow = this.bsBuff; int bsLiveShadow = this.bsLive;
@Override protected void resetStream() throws IOException { BufferedInputStream bis = new BufferedInputStream( new FileInputStream(file), RandomAccessInputStream.MAX_OVERHEAD); int skipped = 0; while (skipped < 2) { skipped += bis.skip(2 - skipped); } stream = new DataInputStream(new CBZip2InputStream(bis)); }
CBZip2InputStream bzip = new CBZip2InputStream(bais); block = new byte[blockSizeBytes]; bzip.read(block, 0, block.length); tempPixels = null; bais.close(); bzip.close(); bais = null; bzip = null;
private void setupNoRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suCh2 = suCh2Shadow; this.suTPos = this.data.tt[this.suTPos]; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); setupBlock(); } }
private void complete() throws IOException { this.storedCombinedCRC = bsGetInt(); this.currentState = EOF; this.data = null; if (this.storedCombinedCRC != this.computedCombinedCRC) { reportCRCError(); } }
private char bsGetUByte() throws IOException { return (char) bsR(8); }
CBZip2InputStream bzip = new CBZip2InputStream(bais); block = new byte[blockSizeBytes]; bzip.read(block, 0, block.length); tempPixels = null; bais.close(); bzip.close(); bais = null; bzip = null;
private void setupRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suTPos = this.data.tt[this.suTPos]; if (this.suRNToGo == 0) { this.suRNToGo = R_NUMS[this.suRTPos] - 1; if (++this.suRTPos == 512) this.suRTPos = 0; } else this.suRNToGo--; this.suCh2 = suCh2Shadow ^= (this.suRNToGo == 1) ? 1 : 0; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { endBlock(); initBlock(); setupBlock(); } }
private boolean bsGetBit() throws IOException { return bsR(1) != 0; }