Python module for fast indexing of immutable memory-mapped intervalsets.
First, make sure Rust is installed (tested on stable 1.43.0). Next, run python3 setup.py install --user
.
Run pytest -v .
from inside the tests
directory.
The implementations for the following types are located in /src
and file
writers are available in rs_intervalset/writer.py
.
Intervals are grouped by video id. For a single video id:
- u32 (LE) ID
- u32 (LE) Number of intervals
- For each interval (sorted by start):
- u32 (LE) start
- u32 (LE) end
Repeat for each video id.
For indexing functionality to be correct, intervals must be non-overlapping and sorted.
Intervals are grouped by video id. For a single video id:
- u32 (LE) ID
- u32 (LE) Number of intervals
- For each interval (sorted by start):
- u32 (LE) start
- u32 (LE) end
- up to 8 bytes (LE) payload
Repeat for each video id.
Intervals must be sorted by start time, but can overlap.