checkBounds(l, MAX_ALPHA_SIZE, "length"); base[l + 1]++;
private int getAndMoveToFrontDecode0() throws IOException { final Data dataShadow = this.data; final int zt = dataShadow.selector[0] & 0xff; checkBounds(zt, N_GROUPS, "zt"); final int[] limit_zt = dataShadow.limit[zt]; int zn = dataShadow.minLens[zt]; checkBounds(zn, MAX_ALPHA_SIZE, "zn"); int zvec = bsR(bin, zn); while (zvec > limit_zt[zn]) { checkBounds(++zn, MAX_ALPHA_SIZE, "zn"); zvec = (zvec << 1) | bsR(bin, 1); } final int tmp = zvec - dataShadow.base[zt][zn]; checkBounds(tmp, MAX_ALPHA_SIZE, "zvec"); return dataShadow.perm[zt][tmp]; }
int lastShadow = -1; int zt = selector[groupNo] & 0xff; checkBounds(zt, N_GROUPS, "zt"); int[] base_zt = base[zt]; int[] limit_zt = limit[zt]; checkBounds(++groupNo, MAX_SELECTORS, "groupNo"); zt = selector[groupNo] & 0xff; checkBounds(zt, N_GROUPS, "zt"); base_zt = base[zt]; limit_zt = limit[zt]; checkBounds(zn, MAX_ALPHA_SIZE, "zn"); int zvec = bsR(bin, zn); while(zvec > limit_zt[zn]) { checkBounds(++zn, MAX_ALPHA_SIZE, "zn"); zvec = (zvec << 1) | bsR(bin, 1); checkBounds(tmp, MAX_ALPHA_SIZE, "zvec"); nextSym = perm_zt[tmp]; checkBounds(yy0, 256, "yy"); final byte ch = seqToUnseq[yy0]; unzftab[ch & 0xff] += s + 1; checkBounds(nextSym, 256 + 1, "nextSym"); checkBounds(tmp, 256, "yy"); unzftab[seqToUnseq[tmp] & 0xff]++;
private int setupNoRandPartB() throws IOException { if (this.su_ch2 != this.su_chPrev) { this.su_count = 1; return setupNoRandPartA(); } else if (++this.su_count >= 4) { checkBounds(this.su_tPos, this.data.ll8.length, "su_tPos"); this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff); this.su_tPos = this.data.tt[this.su_tPos]; this.su_j2 = 0; return setupNoRandPartC(); } else { return setupNoRandPartA(); } }
checkBounds(tmp, ttLen, "tt index"); tt[tmp] = i;
private int setupNoRandPartA() throws IOException { if (this.su_i2 <= this.last) { this.su_chPrev = this.su_ch2; final int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff; this.su_ch2 = su_ch2Shadow; checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; this.su_i2++; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(su_ch2Shadow); return su_ch2Shadow; } this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); return setupBlock(); }
checkBounds(alphaSize, MAX_ALPHA_SIZE + 1, "alphaSize"); checkBounds(nGroups, N_GROUPS + 1, "nGroups"); checkBounds(nSelectors, MAX_SELECTORS + 1, "nSelectors"); checkBounds(v, N_GROUPS, "selectorMtf"); final byte tmp = pos[v]; while (v > 0) {
private int setupRandPartB() throws IOException { if (this.su_ch2 != this.su_chPrev) { this.currentState = RAND_PART_A_STATE; this.su_count = 1; return setupRandPartA(); } else if (++this.su_count >= 4) { this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff); checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; if (this.su_rNToGo == 0) { this.su_rNToGo = Rand.rNums(this.su_rTPos) - 1; if (++this.su_rTPos == 512) { this.su_rTPos = 0; } } else { this.su_rNToGo--; } this.su_j2 = 0; this.currentState = RAND_PART_C_STATE; if (this.su_rNToGo == 1) { this.su_z ^= 1; } return setupRandPartC(); } else { this.currentState = RAND_PART_A_STATE; return setupRandPartA(); } }
private int setupRandPartA() throws IOException { if (this.su_i2 <= this.last) { this.su_chPrev = this.su_ch2; int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff; checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; if (this.su_rNToGo == 0) { this.su_rNToGo = Rand.rNums(this.su_rTPos) - 1; if (++this.su_rTPos == 512) { this.su_rTPos = 0; } } else { this.su_rNToGo--; } this.su_ch2 = su_ch2Shadow ^= (this.su_rNToGo == 1) ? 1 : 0; this.su_i2++; this.currentState = RAND_PART_B_STATE; this.crc.updateCRC(su_ch2Shadow); return su_ch2Shadow; } endBlock(); initBlock(); return setupBlock(); }
checkBounds(l, MAX_ALPHA_SIZE, "length"); base[l + 1]++;
private int getAndMoveToFrontDecode0() throws IOException { final Data dataShadow = this.data; final int zt = dataShadow.selector[0] & 0xff; checkBounds(zt, N_GROUPS, "zt"); final int[] limit_zt = dataShadow.limit[zt]; int zn = dataShadow.minLens[zt]; checkBounds(zn, MAX_ALPHA_SIZE, "zn"); int zvec = bsR(bin, zn); while (zvec > limit_zt[zn]) { checkBounds(++zn, MAX_ALPHA_SIZE, "zn"); zvec = (zvec << 1) | bsR(bin, 1); } final int tmp = zvec - dataShadow.base[zt][zn]; checkBounds(tmp, MAX_ALPHA_SIZE, "zvec"); return dataShadow.perm[zt][tmp]; }
int lastShadow = -1; int zt = selector[groupNo] & 0xff; checkBounds(zt, N_GROUPS, "zt"); int[] base_zt = base[zt]; int[] limit_zt = limit[zt]; checkBounds(++groupNo, MAX_SELECTORS, "groupNo"); zt = selector[groupNo] & 0xff; checkBounds(zt, N_GROUPS, "zt"); base_zt = base[zt]; limit_zt = limit[zt]; checkBounds(zn, MAX_ALPHA_SIZE, "zn"); int zvec = bsR(bin, zn); while(zvec > limit_zt[zn]) { checkBounds(++zn, MAX_ALPHA_SIZE, "zn"); zvec = (zvec << 1) | bsR(bin, 1); checkBounds(tmp, MAX_ALPHA_SIZE, "zvec"); nextSym = perm_zt[tmp]; checkBounds(yy0, 256, "yy"); final byte ch = seqToUnseq[yy0]; unzftab[ch & 0xff] += s + 1; checkBounds(nextSym, 256 + 1, "nextSym"); checkBounds(tmp, 256, "yy"); unzftab[seqToUnseq[tmp] & 0xff]++;
private int setupNoRandPartB() throws IOException { if (this.su_ch2 != this.su_chPrev) { this.su_count = 1; return setupNoRandPartA(); } else if (++this.su_count >= 4) { checkBounds(this.su_tPos, this.data.ll8.length, "su_tPos"); this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff); this.su_tPos = this.data.tt[this.su_tPos]; this.su_j2 = 0; return setupNoRandPartC(); } else { return setupNoRandPartA(); } }
checkBounds(tmp, ttLen, "tt index"); tt[tmp] = i;
private int setupNoRandPartA() throws IOException { if (this.su_i2 <= this.last) { this.su_chPrev = this.su_ch2; final int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff; this.su_ch2 = su_ch2Shadow; checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; this.su_i2++; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(su_ch2Shadow); return su_ch2Shadow; } this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); return setupBlock(); }
checkBounds(alphaSize, MAX_ALPHA_SIZE + 1, "alphaSize"); checkBounds(nGroups, N_GROUPS + 1, "nGroups"); checkBounds(nSelectors, MAX_SELECTORS + 1, "nSelectors"); checkBounds(v, N_GROUPS, "selectorMtf"); final byte tmp = pos[v]; while (v > 0) {
private int setupRandPartB() throws IOException { if (this.su_ch2 != this.su_chPrev) { this.currentState = RAND_PART_A_STATE; this.su_count = 1; return setupRandPartA(); } else if (++this.su_count >= 4) { this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff); checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; if (this.su_rNToGo == 0) { this.su_rNToGo = Rand.rNums(this.su_rTPos) - 1; if (++this.su_rTPos == 512) { this.su_rTPos = 0; } } else { this.su_rNToGo--; } this.su_j2 = 0; this.currentState = RAND_PART_C_STATE; if (this.su_rNToGo == 1) { this.su_z ^= 1; } return setupRandPartC(); } else { this.currentState = RAND_PART_A_STATE; return setupRandPartA(); } }
private int setupRandPartA() throws IOException { if (this.su_i2 <= this.last) { this.su_chPrev = this.su_ch2; int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff; checkBounds(this.su_tPos, this.data.tt.length, "su_tPos"); this.su_tPos = this.data.tt[this.su_tPos]; if (this.su_rNToGo == 0) { this.su_rNToGo = Rand.rNums(this.su_rTPos) - 1; if (++this.su_rTPos == 512) { this.su_rTPos = 0; } } else { this.su_rNToGo--; } this.su_ch2 = su_ch2Shadow ^= (this.su_rNToGo == 1) ? 1 : 0; this.su_i2++; this.currentState = RAND_PART_B_STATE; this.crc.updateCRC(su_ch2Shadow); return su_ch2Shadow; } endBlock(); initBlock(); return setupBlock(); }