LeviLamina
Loading...
Searching...
No Matches
utils::compress_utils::Compressor Class Reference

#include <CompressUtils.h>

Public Member Functions

LLAPI Compressor (SinkFn sink, CompressFormat format=CompressFormat::Gzip, CompressLevel level=CompressLevel::Default)
LLAPI Compressor (Compressor &&) noexcept
LLAPI Compressor & operator= (Compressor &&) noexcept
LLNDAPI Expected status () const
 Fails if the codec for the requested format is unavailable, so check this before writing.
LLAPI Expected write (std::string_view data)
LLAPI Expected finish ()
 Ends the stream. Writing afterwards is an error.

Detailed Description

Compresses a byte stream incrementally.

Push input with write as often as needed, then call finish exactly once to flush the trailer. Output is handed to the sink as it is produced, so neither side is ever held whole in memory.

Note
This is the underlying primitive; compress and compressFile are conveniences over it.

The documentation for this class was generated from the following file: