2018-10-11 02:57:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Compression/ICompressionCodec.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class CompressionCodecMultiple final : public ICompressionCodec
|
|
|
|
{
|
|
|
|
public:
|
2018-12-17 08:31:59 +00:00
|
|
|
CompressionCodecMultiple() = default;
|
|
|
|
explicit CompressionCodecMultiple(Codecs codecs);
|
2018-10-11 02:57:48 +00:00
|
|
|
|
2018-12-19 17:20:18 +00:00
|
|
|
UInt8 getMethodByte() const override;
|
2018-10-11 02:57:48 +00:00
|
|
|
|
2018-12-19 17:20:18 +00:00
|
|
|
String getCodecDesc() const override;
|
2018-10-11 02:57:48 +00:00
|
|
|
|
2019-01-15 14:20:34 +00:00
|
|
|
UInt32 getMaxCompressedDataSize(UInt32 uncompressed_size) const override;
|
2018-10-11 02:57:48 +00:00
|
|
|
|
2018-12-19 17:20:18 +00:00
|
|
|
protected:
|
|
|
|
UInt32 doCompressData(const char * source, UInt32 source_size, char * dest) const override;
|
2018-10-11 02:57:48 +00:00
|
|
|
|
2018-12-19 17:20:18 +00:00
|
|
|
void doDecompressData(const char * source, UInt32 source_size, char * dest, UInt32 uncompressed_size) const override;
|
2018-10-11 02:57:48 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Codecs codecs;
|
|
|
|
String codec_desc;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|