static bitSize(n) {
        Util.need(n >= 0, "bitSize: n >= 0");
        if (n === 0) {
            return 0;
        }
        return Util.floorLg2(n) + 1;
    }
Returns the number of bits needed to uniquely encode all integers up to and including the given value.
A discrete off-by-one version of log_2(n).
@param {!int} n
@returns {!int}