code: private void trimZeros()
    {
      // loop over ALL_ZEROS_LITERAL words
      int w;
      do {
        w = words[lastWordIndex];
        if (w == ConciseSetUtils.ALL_ZEROS_LITERAL) {
          lastWordIndex--;
        } else if (isZeroSequence(w)) {
          if (simulateWAH || isSequenceWithNoBits(w)) {
            lastWordIndex--;
          } else {
            // convert the sequence in a 1-bit literal word
            words[lastWordIndex] = getLiteral(w);
            return;
          }
        } else {
          // one sequence or literal
          return;
        }
        if (lastWordIndex < 0) {
          reset();
          return;
        }
      } while (true);
    }
docs: Removes trailing zeros