public void put(int index, boolean value) {
        int byteNum = index/8;
        int bitNum = index % 8;

        if (byteNum >= bytes.length) {
            if (value == false) {
                return;
            }
            adjustArray(Math.max(byteNum+1,bytes.length*2));
        }

        if (value) {
            bytes[byteNum] |= ONBITS[bitNum];
            if (index > lastNonZeroIndex) {
                lastNonZeroIndex = index;
            }
        }
        else {
            bytes[byteNum] &= OFFBITS[bitNum];
            if (index == lastNonZeroIndex) {
                lastNonZeroIndex = findLastNonZeroIndex();
            }
            if (lastNonZeroIndex/8 < bytes.length / 4) {
                adjustArray(lastNonZeroIndex/4); // lastNonZeroIndex/8 * 2
            }
        }
    }
Puts the given boolean value in the boolean array at
the given index
@param index Index into the array.
@param value value to store
@throws IndexOutOfBoundsException if the index is negative
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BooleanArray.java