Set::IntSpan manages sets of integers. It is optimized for sets that have long runs of consecutive integers.