code: private void mergeReleasedEntries(Segment segment, OffsetPredicate predicate, Segment compactSegment) {
      for (long i = segment.firstIndex(); i <= segment.lastIndex(); i++) {
        long offset = segment.offset(i);
        if (offset != -1 && !predicate.test(offset)) {
          compactSegment.release(i);
        }
      }
    }
docs: Updates the new compact segment with entries that were released in the given segment during compaction.