An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an LZ4-compressed buffer. More...
#include <writer.hpp>
Public Member Functions | |
const std::byte * | compressedData () const override |
Returns a pointer to the compressed data. This will only be called after end() . More... | |
uint64_t | compressedSize () const override |
Returns the size in bytes of the compressed data. This will only be called after end() . More... | |
const std::byte * | data () const override |
Returns a pointer to the uncompressed data. More... | |
bool | empty () const override |
Returns true if write() has never been called since initialization or the last call to clear() . More... | |
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. More... | |
void | handleClear () override |
void | handleWrite (const std::byte *data, uint64_t size) override |
LZ4Writer (CompressionLevel compressionLevel, uint64_t chunkSize) | |
uint64_t | size () const override |
Returns the size in bytes of the uncompressed data. More... | |
Public Member Functions inherited from mcap::IChunkWriter | |
void | clear () |
Clear the internal state of the writer, discarding any input or output buffers. More... | |
virtual | ~IChunkWriter () override=default |
Public Member Functions inherited from mcap::IWritable | |
uint32_t | crc () |
Returns the CRC32 of the uncompressed data. More... | |
IWritable () noexcept | |
void | resetCrc () |
Resets the CRC32 calculation. More... | |
void | write (const std::byte *data, uint64_t size) |
Called whenever the writer needs to write data to the output MCAP file. More... | |
virtual | ~IWritable ()=default |
Private Attributes | |
std::vector< std::byte > | compressedBuffer_ |
CompressionLevel | compressionLevel_ |
std::vector< std::byte > | uncompressedBuffer_ |
Additional Inherited Members | |
Public Attributes inherited from mcap::IWritable | |
bool | crcEnabled = false |
An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an LZ4-compressed buffer.
Definition at line 258 of file writer.hpp.
mcap::LZ4Writer::LZ4Writer | ( | CompressionLevel | compressionLevel, |
uint64_t | chunkSize | ||
) |
|
overridevirtual |
Returns a pointer to the compressed data. This will only be called after end()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns the size in bytes of the compressed data. This will only be called after end()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns a pointer to the uncompressed data.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns true if write()
has never been called since initialization or the last call to clear()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
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.
Implements mcap::IChunkWriter.
|
overridevirtual |
Implements mcap::IChunkWriter.
|
overridevirtual |
Implements mcap::IWritable.
|
overridevirtual |
Returns the size in bytes of the uncompressed data.
Implements mcap::IChunkWriter.
|
private |
Definition at line 273 of file writer.hpp.
|
private |
Definition at line 274 of file writer.hpp.
|
private |
Definition at line 272 of file writer.hpp.