private void append(int i) {
		// special case of empty set
		if (isEmpty()) {
			int zeroBlocks = maxLiteralLengthDivision(i);
			if (zeroBlocks == 0) {
				words = new int[1];
				lastWordIndex = 0;
			} else if (zeroBlocks == 1) {
				words = new int[2];
				lastWordIndex = 1;
				words[0] = ALL_ZEROS_LITERAL;
			} else {
				words = new int[2];
				lastWordIndex = 1;
				words[0] = zeroBlocks - 1;
			}
			last = i;
			size = 1;
			words[lastWordIndex] = ALL_ZEROS_LITERAL | (1 << maxLiteralLengthModulus(i));
			return;
		}
		
		// position of the next bit to set within the current literal
		int bit = maxLiteralLengthModulus(last) + i - last;

		// if we are outside the current literal, add zeros in
		// between the current word and the new 1-bit literal word
		if (bit >= MAX_LITERAL_LENGHT) {
			int zeroBlocks = maxLiteralLengthDivision(bit) - 1;
			bit = maxLiteralLengthModulus(bit);
			if (zeroBlocks == 0) {
				ensureCapacity(lastWordIndex + 1);
			} else {
				ensureCapacity(lastWordIndex + 2);
				appendFill(zeroBlocks, 0);
			}
			appendLiteral(ALL_ZEROS_LITERAL | 1 << bit);
		} else {
			words[lastWordIndex] |= 1 << bit;
			if (words[lastWordIndex] == ALL_ONES_LITERAL) {
				lastWordIndex--;
				appendLiteral(ALL_ONES_LITERAL);
			}
		}

		// update other info
		last = i;
		if (size >= 0)
			size++;
	}