Go to the documentation of this file.
9 #ifndef EAGINE_COMPRESSION_HPP
10 #define EAGINE_COMPRESSION_HPP
33 class data_compressor_impl;
79 std::shared_ptr<data_compressor_impl> _pimpl{};
84 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
85 #include <eagine/compression.inl>
88 #endif // EAGINE_COMPRESSION_HPP
auto compress(memory::const_block input, memory::buffer &output) -> memory::const_block
Compress the input block, writing the compressed data to output.
Definition: compression.hpp:58
Declaration of class template storing a reference to a callable object.
Definition: callable_ref.hpp:24
Common code is placed in this namespace.
Definition: eagine.hpp:21
basic_block< true > const_block
Alias for const byte memory span.
Definition: block.hpp:32
@ highest
Slowest compression method highest compression level.
Reallocatable owning byte buffer.
Definition: buffer.hpp:22
callable_ref< bool(memory::const_block)> data_handler
Alias for data handler callable type.
Definition: compression.hpp:43
Non-owning view of a contiguous range of memory with ValueType elements.
Definition: flatten_fwd.hpp:16
auto compress(memory::const_block input, const data_handler &handler, data_compression_level level) -> bool
Compress the input block, passing the packed data to handler.
Class implementing data compression and decompresson.
Definition: compression.hpp:37
data_compression_level
Data compression level enumeration.
Definition: compression.hpp:22
@ normal
Normal compression level.
auto decompress(memory::const_block input, const data_handler &handler) -> bool
Decompress the input block, passing the unpacked data to handler.
@ lowest
Fastest compression method lowest compression level.
data_compressor()
Default constructor.