Skip to main content

API reference

MCAP libraries are available for C++, Go, Python, Rust, Swift, and TypeScript. All libraries are tested for conformance with the MCAP specification.

Feature Matrix

Indexed unordered message readingYesYesYesYesNoYes
Timestamp-ordered message readingYesYesYesNoYesYes
Indexed metadata readingYes 1Yes 1YesYesYes 1Yes 1
Indexed attachment readingYes 1Yes 1YesYesYes 1Yes 1
Non-materialized attachment readingYes 2NoNoYesNoNo
Non-indexed readingYesYesYesYesYesYes
CRC validationNoYesNoYesYesYes
ROS1 wrapperNoNoYesNoNoNo
ROS2 wrapperYes 3NoYes 3NoNoNo
Protobuf wrapperNoNoYesNoNoNo
Record writingYesYesYesYesYesYes
Easy chunked writingYesYesYesYesYesYes
Automatic summary writingYes 4Yes 4Yes 4Yes4Yes 4Yes 4

 1 These readers don’t have a single call to read an attachment or metadata record by name, but do allow you to read the summary, seek to that location, read a record and parse it.
 2 The C++ reader interface does not preclude one from backing it with a memory-mapped file. This could be used to implement message and attachment parsing without copying data into memory.
 3 Using the MCAP Rosbag2 storage plugin.
 4 All writers currently do not compute a CRC for the DataEnd record.