Go to the documentation of this file.
9 #ifndef EAGINE_SERIALIZE_PACKED_BLOCK_SOURCE_HPP
10 #define EAGINE_SERIALIZE_PACKED_BLOCK_SOURCE_HPP
12 #include "../compression.hpp"
30 : _compressor{std::move(compressor)} {
45 data_compressor _compressor{};
50 #endif // EAGINE_SERIALIZE_PACKED_BLOCK_SOURCE_HPP
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
Unpacking deserialization data source backed by a pre-allocated memory block.
Definition: packed_block_source.hpp:21
Deserialization data source backed by a pre-allocated memory block.
Definition: block_source.hpp:23
Non-owning view of a contiguous range of memory with ValueType elements.
Definition: flatten_fwd.hpp:16
packed_block_data_source() noexcept=default
Default constructor.
Class implementing data compression and decompresson.
Definition: compression.hpp:37
packed_block_data_source(data_compressor compressor, memory::const_block src) noexcept
Constructor setting the backing block and data compressor.
Definition: packed_block_source.hpp:27
auto decompress(memory::const_block input, const data_handler &handler) -> bool
Decompress the input block, passing the unpacked data to handler.
void reset(memory::const_block src)
Resets the backing block.
Definition: block_source.hpp:34