code: public void compact() {
          final int idealCapacity = (int) Math.round(size() * (1.0d / loadFactor));
          rehash(QuickMath.nextPowerOfTwo(idealCapacity));
      }
docs: Compact the {@link Map} backing arrays by rehashing with a capacity just larger than current size
  and giving consideration to the load factor.