code: private void compactGroups() {
      for (int i = 0; i < groups.size(); i++) {
        List<Segment> group = groups.get(i);
        List<OffsetPredicate> groupPredicates = predicates.get(i);
        Segment segment = compactGroup(group, groupPredicates);
        mergeReleased(group, groupPredicates, segment);
        deleteGroup(group);
      }
    }
docs: Compacts all compactable segments.