blob: 8b88cc0a62e2997dbdb6bfe69ae3a36d39453ff9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "compressiontype.h"
namespace config {
vespalib::string
compressionTypeToString(const CompressionType & compressionType)
{
switch (compressionType) {
case CompressionType::UNCOMPRESSED:
return "UNCOMPRESSED";
default:
return "LZ4";
}
}
CompressionType
stringToCompressionType(const vespalib::string & type)
{
if (type.compare("UNCOMPRESSED") == 0) {
return CompressionType::UNCOMPRESSED;
} else {
return CompressionType::LZ4;
}
}
}
|