A set of u64 items kept as disjoint, non-touching half-open ranges
$ sexc add @ajax/range-set- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 04:09v/# 1 version
- drwxr-xr-x-Oct 27 04:09files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 04:09 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0
- dependents
- @ajax/mesh-peer-view
- keywords
- mesh alphaos fleet ranges set intervals
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/range-set
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/range-set 2 3A 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. 7 8## Ported from 9 10[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/jobs.rs`: `Ranges`. 11 12## Tests 13 14`tests/ranges.c`: the edge cases, and 200 rounds of random inserts and removes checked against a bitmap. 15 16## Licence 17 18MIT. See the repository's LICENSE.