code: private void mergeReleasedEntries(Segment segment, Segment compactSegment) {
      for (long i = segment.firstIndex(); i <= segment.lastIndex(); i++) {
        if (!segment.isLive(i)) {
          compactSegment.release(i);
        }
      }
    }
docs: Updates the new compact segment with entries that were released from the given segment during compaction.