roboto.formats.mcap.fetch#
Module Contents#
- roboto.formats.mcap.fetch.open_for_window(signed_url, start_time=None, end_time=None)#
Open a remote MCAP file for reading, prefetching only the chunks in a log-time window.
Reads the file’s summary section to locate its chunk index, identifies the chunks whose message log times intersect
[start_time, end_time), and prefetches that byte range in parallel so subsequent sequential reads hit the local buffer instead of issuing many small HTTP range requests. The returned reader is positioned at the start of the file. The caller owns it and mustclose()it.The window is matched against the chunk index’s log-time bounds; when row timestamps come from somewhere other than the message log time, pass no bounds (prefetching then covers every chunk) and filter rows after decode.
- Parameters:
signed_url (str) – Resolved download URL of the MCAP file.
start_time (Optional[int]) – Inclusive window lower bound in nanoseconds, or
Nonefor unbounded.end_time (Optional[int]) – Exclusive window upper bound in nanoseconds, or
Nonefor unbounded.
- Returns:
An
HttpRangeReaderover the file, primed with the in-window chunk bytes and positioned at offset 0.- Return type: