Class LZ4Writer

Inheritance Relationships

Base Type

Class Documentation

class LZ4Writer : public mcap::IChunkWriter

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

Public Functions

LZ4Writer(CompressionLevel compressionLevel, uint64_t chunkSize)
virtual void handleWrite(const std::byte *data, uint64_t size) override
virtual void end() override

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.

virtual uint64_t size() const override

Returns the size in bytes of the uncompressed data.

virtual uint64_t compressedSize() const override

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

virtual bool empty() const override

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

virtual void handleClear() override
virtual const std::byte *data() const override

Returns a pointer to the uncompressed data.

virtual const std::byte *compressedData() const override

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