tudocomp
– The TU Dortmund Compression Framework
Compressor.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <functional>
4 #include <memory>
5 
8 #include <tudocomp/Algorithm.hpp>
9 
10 namespace tdc {
11 
19 class Compressor: public Algorithm {
20 public:
21  virtual ~Compressor() = default;
22  Compressor(Compressor const&) = default;
23  Compressor(Compressor&&) = default;
24  Compressor& operator=(Compressor const&) = default;
25  Compressor& operator=(Compressor&&) = default;
26 
30  inline Compressor(Env&& env): Algorithm(std::move(env)) {}
31 
36  virtual void compress(Input& input, Output& output) = 0;
37 
42  virtual void decompress(Input& input, Output& output) = 0;
43 };
44 
45 }
46 
Contains the text compression and encoding framework.
Definition: namespaces.hpp:11
Base for data compressors.
Definition: Compressor.hpp:19
virtual ~Compressor()=default
Env & env()
Provides access to the environment that the algorithm works in.
Definition: Algorithm.hpp:51
An abstraction layer for algorithm output.
Definition: Output.hpp:23
virtual void compress(Input &input, Output &output)=0
Compress the given input to the given output.
Compressor(Compressor const &)=default
Compressor & operator=(Compressor const &)=default
Local environment for a compression/encoding/decompression call.
Compressor(Env &&env)
Construct the compressor with an environment.
Definition: Compressor.hpp:30
virtual void decompress(Input &input, Output &output)=0
Decompress the given input to the given output.
Interface for algorithms.
Definition: Algorithm.hpp:15
An abstraction layer for algorithm input.
Definition: Input.hpp:37