Class ICompressedReader

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ICompressedReader : public mcap::IReadable

An abstract interface for compressed readers.

Subclassed by mcap::BufferReader, mcap::LZ4Reader, mcap::ZStdReader

Public Functions

virtual ~ICompressedReader() override = default
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.

Parameters:
  • 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.

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.