code: private List<SegmentChunk> rebase(List<SegmentChunk> segmentChunks, long newStartOffset) {
          AtomicLong segmentOffset = new AtomicLong(newStartOffset);
          return segmentChunks.stream()
                  .map(s -> s.withNewOffset(segmentOffset.getAndAdd(s.getLength())))
                  .collect(Collectors.toList());
      }
docs: region Helpers