blob: 208d950a389bd6766ec3f4c7c8e4baa0329f8e6f (
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
28
29
30
31
32
33
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vector>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchlib/common/tunefileinfo.h>
namespace search::diskindex {
class FileHeader
{
private:
bool _bigEndian;
bool _completed;
uint32_t _version;
uint32_t _headerLen;
uint64_t _fileBitSize;
std::vector<vespalib::string> _formats;
public:
FileHeader();
~FileHeader();
bool taste(const vespalib::string &name, const TuneFileSeqRead &tuneFileRead);
bool taste(const vespalib::string &name, const TuneFileSeqWrite &tuneFileWrite);
bool taste(const vespalib::string &name, const TuneFileRandRead &tuneFileSearch);
bool getBigEndian() const { return _bigEndian; }
uint32_t getVersion() const { return _version; }
const std::vector<vespalib::string> &getFormats() const { return _formats; }
};
}
|