1# @ajax/range-set
23A set of u64 items kept as disjoint, non-touching half-open ranges `[s, e)` in order: insert (merging
4what overlaps or touches), remove (splitting), contains, union, subtract, and saturating lengths. The
5fleet uses it to count the bytes of a migrated view that arrived (a duplicate chunk counts once); the
6jobs use it for chunk sets.
78## Ported from
910[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/jobs.rs`: `Ranges`.
1112## Tests
1314`tests/ranges.c`: the edge cases, and 200 rounds of random inserts and removes checked against a bitmap.
1516## Licence
1718MIT. See the repository's LICENSE.