An abstract interface for compressed readers. More...
#include <reader.hpp>
Public Member Functions | |
virtual void | reset (const std::byte *data, uint64_t size, uint64_t uncompressedSize)=0 |
Reset the reader state, clearing any internal buffers and state, and initialize with new compressed data. More... | |
virtual Status | status () const =0 |
Report the current status of decompression. A StatusCode other than StatusCode::Success after reset() is called indicates the decompression was not successful and the reader is in an invalid state. More... | |
virtual | ~ICompressedReader () override=default |
Public Member Functions inherited from mcap::IReadable | |
virtual uint64_t | read (std::byte **output, uint64_t offset, uint64_t size)=0 |
This method is called by MCAP reader classes when they need to read a portion of the file. More... | |
virtual uint64_t | size () const =0 |
Returns the size of the file in bytes. More... | |
virtual | ~IReadable ()=default |
An abstract interface for compressed readers.
Definition at line 109 of file reader.hpp.
|
overridevirtualdefault |
|
pure virtual |
Reset the reader state, clearing any internal buffers and state, and initialize with new compressed data.
data | Compressed data to read from. |
size | Size of the compressed data in bytes. |
uncompressedSize | Size of the data in bytes after decompression. A buffer of this size will be allocated for the uncompressed data. |
Implemented in mcap::LZ4Reader, mcap::ZStdReader, and mcap::BufferReader.
|
pure virtual |
Report the current status of decompression. A StatusCode other than StatusCode::Success
after reset()
is called indicates the decompression was not successful and the reader is in an invalid state.
Implemented in mcap::LZ4Reader, mcap::ZStdReader, and mcap::BufferReader.