private int adjustSize(int minSize, int maxSize, int cnt, int byteOffset) {
        double density = (double)cnt / (double)(byteOffset - rootOffset);
        double estSize = 1.1 * density * binarySize();
        double expSize = 1.25 * data.length;
        double wantedSize = (estSize > expSize) ? estSize : expSize;
        if (wantedSize < minSize) {
            return minSize;
        }
        if (wantedSize > maxSize) {
            return maxSize;
        }
        return (int)wantedSize;
    }
Light-weight index structure describing the layout of a Slime value
encoded in binary format.
vespajlib/src/main/java/com/yahoo/slime/DecodeIndex.java