11 template<
typename coder_t>
16 Meta m(
"compressor",
"encode",
"Simply encodes the input's individual characters.");
24 auto iview = input.as_view();
26 typename coder_t::Encoder coder(
29 for(uint8_t c : iview) {
35 auto ostream = output.as_stream();
36 typename coder_t::Decoder decoder(
env().env_for_option(
"coder"), input);
38 while(!decoder.eof()) {
39 ostream << decoder.template decode<uint8_t>(
literal_r);
Contains the text compression and encoding framework.
Base for data compressors.
virtual void compress(Input &input, Output &output) override final
Compress the given input to the given output.
A literal iterator that yields every character from a View.
LiteralEncoder(Env &&env)
Env & env()
Provides access to the environment that the algorithm works in.
constexpr auto literal_r
Global predefined reange for literals.
An abstraction layer for algorithm output.
virtual void decompress(Input &input, Output &output) override final
Decompress the given input to the given output.
Local environment for a compression/encoding/decompression call.