aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/frt/compressioninfo.cpp
blob: a5c0426774ada4a7c3b55b89b5c032acdde2c388 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "compressioninfo.h"
#include <vespa/config/frt/protocol.h>
#include <vespa/vespalib/data/slime/inspector.h>

using namespace vespalib;
using namespace vespalib::slime;
using namespace config::protocol;

namespace config {

CompressionInfo::CompressionInfo()
    : compressionType(CompressionType::UNCOMPRESSED),
      uncompressedSize(0)
{
}

void
CompressionInfo::deserialize(const Inspector & inspector)
{
    compressionType = stringToCompressionType(inspector["compressionType"].asString().make_string());
    uncompressedSize = inspector["uncompressedSize"].asLong();
}

}