private static int getBits(int i, BZip2BlockEntry blockEntry) {
		int j;
		do {
			if (blockEntry.anInt577 >= i) {
				int k = blockEntry.anInt576 >> blockEntry.anInt577 - i & (1 << i) - 1;
				blockEntry.anInt577 -= i;
				j = k;
				break;
			}
			blockEntry.anInt576 = blockEntry.anInt576 << 8 | blockEntry.inputBuffer[blockEntry.offset] & 0xff;
			blockEntry.anInt577 += 8;
			blockEntry.offset++;
			blockEntry.compressedSize--;
			blockEntry.anInt566++;
			if (blockEntry.anInt566 == 0)
				blockEntry.anInt567++;
		} while (true);
		return j;
	}