protected void shift() throws IOException {
		int bit = (int)(low >>> (STATE_SIZE - 1));
		output.write((byte)bit);
		
		// Write out saved underflow bits
		for (; underflow > 0; underflow--)
			output.write((byte)(bit ^ 1));
	}