ktor-http / io.ktor.http / RangesSpecifier / merge

merge

fun merge(length: Long, maxRangeCount: Int = 50): List<LongRange>

Resolve and merge all overlapping and neighbours ranges

Parameters

length - content length

Return
a list of absolute long ranges

fun merge(length: Long): List<LongRange>

Merges all overlapping and neighbours ranges. Currently gaps collapse is not supported but should be, one day.