code: private void compact()
    {
      if (words != null && ((lastWordIndex + 1) << 1) < words.length) {
        words = Arrays.copyOf(words, lastWordIndex + 1);
      }
    }
docs: Removes unused allocated words at the end of {@link #words} only when they
  are more than twice of the needed space