public void flip(long index) {
        assert index >= 0 && index < (wlen << 6);

        int wordNum = expandingWordNum(index);
        int bit = (int) index & 0x3f; // mod 64
        long bitmask = 1L << bit;
        setWord(wordNum, word(wordNum) ^ bitmask);
    }
Flips a bit, expanding the set size if necessary.

@param index the index to flip
indexr-common/src/main/java/io/indexr/util/DirectBitMap.java