1 | #pragma once |
---|---|
2 | |
3 | #include <Compression/ICompressionCodec.h> |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | class CompressionCodecMultiple final : public ICompressionCodec |
9 | { |
10 | public: |
11 | CompressionCodecMultiple() = default; |
12 | explicit CompressionCodecMultiple(Codecs codecs_); |
13 | |
14 | UInt8 getMethodByte() const override; |
15 | |
16 | String getCodecDesc() const override; |
17 | |
18 | UInt32 getMaxCompressedDataSize(UInt32 uncompressed_size) const override; |
19 | |
20 | void useInfoAboutType(DataTypePtr data_type) override; |
21 | |
22 | protected: |
23 | UInt32 doCompressData(const char * source, UInt32 source_size, char * dest) const override; |
24 | |
25 | void doDecompressData(const char * source, UInt32 source_size, char * dest, UInt32 uncompressed_size) const override; |
26 | |
27 | private: |
28 | Codecs codecs; |
29 | |
30 | }; |
31 | |
32 | |
33 | class CompressionCodecFactory; |
34 | void registerCodecMultiple(CompressionCodecFactory & factory); |
35 | |
36 | } |
37 |