Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/compression/decompressor/decompressor.h" 4 : 5 : namespace Envoy { 6 : namespace Compression { 7 : namespace Decompressor { 8 : 9 : class DecompressorFactory { 10 : public: 11 0 : virtual ~DecompressorFactory() = default; 12 : 13 : virtual DecompressorPtr createDecompressor(const std::string& stats_prefix) PURE; 14 : virtual const std::string& statsPrefix() const PURE; 15 : // TODO(junr03): this method assumes that decompressors are used on http messages. 16 : // A more generic method might be `hint()` which gives the user of the decompressor a hint about 17 : // the type of decompression that it can perform. 18 : virtual const std::string& contentEncoding() const PURE; 19 : }; 20 : 21 : using DecompressorFactoryPtr = std::unique_ptr<DecompressorFactory>; 22 : 23 : } // namespace Decompressor 24 : } // namespace Compression 25 : } // namespace Envoy