function calcStartAndEnd(offset, len) {
      const start = offset;
      const end = Math.max(offset, offset + len - 1);

      return [start, end];
    }
@param {number} offset offset
@param {number} len len
@returns {[number, number]} start and end