public void set(long startIndex, long endIndex) {
        assert startIndex >= 0;
        assert endIndex <= (wlen << 6);

        if (endIndex <= startIndex) return;

        int startWord = (int) (startIndex >> 6);

        // since endIndex is one past the end, this is index of the last
        // word to be changed.
        int endWord = expandingWordNum(endIndex - 1);

        long startmask = -1L << startIndex;
        long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex
        // due to wrap

        if (startWord == endWord) {
            setWord(startWord, word(startWord) | (startmask & endmask));
            return;
        }

        setWord(startWord, word(startWord) | startmask);
        BitUtil.fillOne(bitsBase, bitsAddr, startWord + 1, endWord);
        setWord(endWord, word(endWord) | endmask);
    }
Sets a range of bits: [startIndex, endIndex).

@param startIndex include
@param endIndex   exclude
indexr-common/src/main/java/io/indexr/util/DirectBitMap.java