Jazz2::Editor::CompressedBuffer class

Data compressed by Deflate in memory.

Constructors, destructors, conversion operators

CompressedBuffer()
CompressedBuffer(const CompressedBuffer&) deleted
CompressedBuffer(CompressedBuffer&&) defaulted noexcept

Public functions

auto operator=(const CompressedBuffer&) -> CompressedBuffer& deleted
auto operator=(CompressedBuffer&&) -> CompressedBuffer& defaulted noexcept
void Compress(ArrayView<const std::uint8_t> data, std::int32_t compressionLevel = 1)
Compresses data, replacing what was there.
auto Decompress(SmallVectorImpl<std::uint8_t>& data) const -> bool
Decompresses the data, returns false if it can't be.
auto IsEmpty() const -> bool
Returns true if there are no data.
auto GetOriginalSize() const -> std::size_t
Returns the size of the data before compression.
auto GetMemoryUsage() const -> std::size_t
Returns the memory taken by the compressed data.