2017-10-12 23:56:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <IO/CompressedStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-10-13 01:11:13 +00:00
|
|
|
struct Settings;
|
2017-10-12 23:56:28 +00:00
|
|
|
|
|
|
|
struct CompressionSettings
|
|
|
|
{
|
2017-11-03 16:39:06 +00:00
|
|
|
CompressionMethod method;
|
2017-10-13 01:02:16 +00:00
|
|
|
int level;
|
2017-10-12 23:56:28 +00:00
|
|
|
|
2017-11-03 16:39:06 +00:00
|
|
|
CompressionSettings()
|
|
|
|
: CompressionSettings(CompressionMethod::LZ4)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CompressionSettings(CompressionMethod method_)
|
|
|
|
: method(method_)
|
|
|
|
, level(getDefaultLevel(method))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CompressionSettings(CompressionMethod method_, int level_)
|
|
|
|
: method(method_)
|
|
|
|
, level(level_)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-10-12 23:56:28 +00:00
|
|
|
CompressionSettings(const Settings & settings);
|
2017-10-13 01:02:16 +00:00
|
|
|
|
|
|
|
static int getDefaultLevel(CompressionMethod method);
|
2017-10-12 23:56:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|