Death::IO::Compression::Lzma2Stream class

Provides read-only streaming of compressed data using the LZMA2 compression algorithm.

Base classes

class Death::IO::Stream
Provides a generic view of a sequence of bytes.

Constructors, destructors, conversion operators

Lzma2Stream()
Lzma2Stream(Stream& inputStream, std::int32_t inputSize = -1)
~Lzma2Stream()
Lzma2Stream(const Lzma2Stream&) deleted
Lzma2Stream(Lzma2Stream&& other) noexcept

Public functions

auto operator=(const Lzma2Stream&) -> Lzma2Stream& deleted
auto operator=(Lzma2Stream&& other) -> Lzma2Stream& noexcept
void Open(Stream& inputStream, std::int32_t inputSize = -1)
void Dispose() override
Closes the stream and releases all assigned resources.
auto Seek(std::int64_t offset, SeekOrigin origin) -> std::int64_t override
Seeks in an opened stream.
auto GetPosition() const -> std::int64_t override
Tells the seek position of an opened stream.
auto Read(void* destination, std::int64_t bytesToRead) -> std::int64_t override
Reads a certain amount of bytes from the stream to a buffer.
auto Write(const void* source, std::int64_t bytesToWrite) -> std::int64_t override
Writes a certain amount of bytes from a buffer to the stream.
auto Flush() -> bool override
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
auto IsValid() -> bool override
Returns true if the stream has been sucessfully opened.
auto GetSize() const -> std::int64_t override
Returns stream size in bytes.
auto SetSize(std::int64_t size) -> std::int64_t override
Sets stream size in bytes.
auto CeaseReading() -> bool