Struct McapWriterOptions

Struct Documentation

struct McapWriterOptions

Configuration options for McapWriter.

Public Functions

inline McapWriterOptions(const std::string_view profile)

Public Members

bool noChunkCRC = false

Disable CRC calculations for Chunks.

bool noAttachmentCRC = false

Disable CRC calculations for Attachments.

bool enableDataCRC = false

Enable CRC calculations for all records in the data section.

bool noSummaryCRC = false

Disable CRC calculations for the summary section.

bool noChunking = false

Do not write Chunks to the file, instead writing Schema, Channel, and Message records directly into the Data section.

bool noMessageIndex = false

Do not write Message Index records to the file. If noSummary=true and noChunkIndex=false, Chunk Index records will still be written to the Summary section, providing a coarse message index.

bool noSummary = false

Do not write Summary or Summary Offset sections to the file, placing the Footer record immediately after DataEnd. This can provide some speed boost to file writing and produce smaller files, at the expense of requiring a conversion process later if fast summarization or indexed access is desired.

uint64_t chunkSize = DefaultChunkSize

Target uncompressed Chunk payload size in bytes. Once a Chunk’s uncompressed data meets or exceeds this size, the Chunk will be compressed (if compression is enabled) and written to disk. Note that smaller Chunks may be written, such as the last Chunk in the Data section. This option is ignored if noChunking=true.

Compression compression = Compression::Zstd

Compression algorithm to use when writing Chunks. This option is ignored if noChunking=true.

CompressionLevel compressionLevel = CompressionLevel::Default

Compression level to use when writing Chunks. Slower generally produces smaller files, at the expense of more CPU time. These levels map to different internal settings for each compression algorithm.

bool forceCompression = false

By default, Chunks that do not benefit from compression will be written uncompressed. This option can be used to force compression on all Chunks. This option is ignored if noChunking=true.

std::string profile

The recording profile. See https://mcap.dev/spec/registry#well-known-profiles for more information on well-known profiles.

std::string library   = "libmcap " MCAP_LIBRARY_VERSION

A freeform string written by recording libraries. For this library, the default is “libmcap {Major}.{Minor}.{Patch}”.

bool noRepeatedSchemas = false
bool noRepeatedChannels = false
bool noAttachmentIndex = false
bool noMetadataIndex = false
bool noChunkIndex = false
bool noStatistics = false
bool noSummaryOffsets = false