class ZStdWriter
Declaration
class ZStdWriter : public IChunkWriter { /* full declaration omitted */ };
Description
An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an ZStandard-compressed buffer.
Declared at: mcap/include/mcap/writer.hpp:296
Inherits from: IChunkWriter
Member Variables
Inherited from IWritable:
- public crcEnabled = false
Method Overview
- public ZStdWriter(mcap::CompressionLevel compressionLevel, uint64_t chunkSize)
- public const std::byte * compressedData() const
- public uint64_t compressedSize() const
- public const std::byte * data() const
- public bool empty() const
- public void end()
- public void handleClear()
- public void handleWrite(const std::byte * data, uint64_t size)
- public uint64_t size() const
- public ~ZStdWriter()
Inherited from IChunkWriter:
- public clear
- public compressedData
- public compressedSize
- public data
- public empty
- public end
- protected handleClear
- public size
Inherited from IWritable:
Methods
¶ZStdWriter(
mcap::CompressionLevel compressionLevel,
uint64_t chunkSize)
ZStdWriter(
mcap::CompressionLevel compressionLevel,
uint64_t chunkSize)
Declared at: mcap/include/mcap/writer.hpp:298
Parameters
- mcap::CompressionLevel compressionLevel
- uint64_t chunkSize
¶const std::byte* compressedData() const
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:308
¶uint64_t compressedSize() const
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:304
¶const std::byte* data() const
const std::byte* data() const
Description
Returns a pointer to the uncompressed data.
Declared at: mcap/include/mcap/writer.hpp:307
¶bool empty() const
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:305
¶void end()
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:302
¶void handleClear()
void handleClear()
Declared at: mcap/include/mcap/writer.hpp:306
¶void handleWrite(const std::byte* data,
uint64_t size)
void handleWrite(const std::byte* data,
uint64_t size)
Declared at: mcap/include/mcap/writer.hpp:301
Parameters
- const std::byte* data
- uint64_t size
¶uint64_t size() const
uint64_t size() const
Description
Returns the size in bytes of the uncompressed data.
Declared at: mcap/include/mcap/writer.hpp:303
¶~ZStdWriter()
~ZStdWriter()
Declared at: mcap/include/mcap/writer.hpp:299