private static void putHistogram(long packAddr,
                                     long value,
                                     long packMin, long packMax,
                                     boolean isFloat) {
        if (intervalTooLarge(packMin, packMax)) {
            return;
        }
        int bit;
        if (isFloat) {
            double dvalue = Double.longBitsToDouble(value);
            double dpackMin = Double.longBitsToDouble(packMin);
            double dpackMax = Double.longBitsToDouble(packMax);
            assert dpackMin <= dpackMax;
            assert dvalue >= dpackMin && dvalue <= dpackMax;
            if (dvalue == dpackMin || dvalue == dpackMax) {
                return;
            }
            double intervalLen = (dpackMax - dpackMin) / (double) PACK_HISTO_SIZE_BIT;
            bit = (int) ((dvalue - dpackMin) / intervalLen);
        } else {
            assert packMin <= packMax;
            assert value >= packMin && value <= packMax;
            if (value == packMin || value == packMax) {
                return;
            }
            if (exactMode(packMin, packMax)) {
                bit = (int) (value - packMin - 1);
            } else {
                double intervalLen = (packMax - packMin) / (double) PACK_HISTO_SIZE_BIT;
                bit = (int) ((value - packMin - 1) / intervalLen);
            }
        }
        if (bit > PACK_HISTO_SIZE_BIT) {
            return;
        }
        assert bit >= 0;
        // An int contains 4 bytes, i.e. 32 bits.
        // index = bit / 32 * 4 + packOffset
        long addr = packAddr + ((bit >>> 5) << 2);
        int oldVal = MemoryUtil.getInt(addr);
        MemoryUtil.setInt(addr, oldVal | (1 << (bit & MOD_32)));
    }
Hash + Histogram, each takes 1024 bits.

| hash index0 | histo index0 | hash index1 | histo index1 | ...
|  1024 bits  |  1024 bits   |  1024 bits  |  1024 bits   | ...
indexr-segment/src/main/java/io/indexr/segment/index/RSIndex_Histogram_V2.java