class LZ4Writer

Declaration

class LZ4Writer : public IChunkWriter { /* full declaration omitted */ };

Description

An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an LZ4-compressed buffer.

Declared at: mcap/include/mcap/writer.hpp:261

Inherits from: IChunkWriter

Member Variables

Inherited from IWritable:

public crcEnabled = false

Method Overview

Inherited from IChunkWriter:

Inherited from IWritable:

Methods

LZ4Writer(mcap::CompressionLevel compressionLevel,
          uint64_t chunkSize)

Declared at: mcap/include/mcap/writer.hpp:263

Parameters

mcap::CompressionLevel compressionLevel
uint64_t chunkSize

const std::byte* compressedData() const

Description

Returns a pointer to the compressed data. This will only be called after `end()`.

Declared at: mcap/include/mcap/writer.hpp:272

uint64_t compressedSize() const

Description

Returns the size in bytes of the compressed data. This will only be called after `end()`.

Declared at: mcap/include/mcap/writer.hpp:268

const std::byte* data() const

Description

Returns a pointer to the uncompressed data.

Declared at: mcap/include/mcap/writer.hpp:271

bool empty() const

Description

Returns true if `write()` has never been called since initialization or the last call to `clear()`.

Declared at: mcap/include/mcap/writer.hpp:269

void end()

Description

Called when the writer wants to close the current output Chunk. After this call, `data()` and `size()` should return the data and size of the compressed data.

Declared at: mcap/include/mcap/writer.hpp:266

void handleClear()

Declared at: mcap/include/mcap/writer.hpp:270

void handleWrite(const std::byte* data,
                 uint64_t size)

Declared at: mcap/include/mcap/writer.hpp:265

Parameters

const std::byte* data
uint64_t size

uint64_t size() const

Description

Returns the size in bytes of the uncompressed data.

Declared at: mcap/include/mcap/writer.hpp:267