12 struct libdeflate_compressor;
13 struct libdeflate_decompressor;
24 using Static = std::array<std::byte, 128 KiB>;
25 using Dynamic = std::unique_ptr<std::byte[]>;
57 template <auto Algorithm>
std::basic_string_view< std::byte > ContiguousByteBufferView
Contains the result of a compression or extraction operation.
std::unique_ptr< std::byte[]> Dynamic
std::variant< Static, Dynamic > Storage
A store allocated on either the stack or heap.
static constexpr size_t StaticCapacity
ContiguousByteBufferView GetView() const
Returns a view (of type std::byte) of the internal store.
size_t Size
The length of valid data in the store.
std::string_view GetStringView() const
Returns a view (of type char) of the internal store.
std::array< std::byte, 128 KiB > Static
Contains routines for data compression.
Result Compress(const void *Input, size_t Size)
Result CompressGZip(ContiguousByteBufferView Input)
Compressor(int CompressionFactor=6)
Creates a new compressor instance with a compression factor [0-12].
Result CompressZLib(ContiguousByteBufferView Input)
libdeflate_compressor * m_Handle
Contains routines for data extraction.
Result ExtractZLib(ContiguousByteBufferView Input)
Result ExtractGZip(ContiguousByteBufferView Input)
Result Extract(ContiguousByteBufferView Input)
Result Extract(ContiguousByteBufferView Input, size_t UncompressedSize)
libdeflate_decompressor * m_Handle
Extractor()
Creates a new extractor instance.