#include "indexer/covering_index.hpp" #include "coding/file_container.hpp" #include "coding/mmap_reader.hpp" #include "defines.hpp" namespace indexer { std::string ReadGeneratorDataVersionFromIndex(std::string const & filename) { FilesContainerR indexContainer(filename); std::pair offsetsAndSize = indexContainer.GetAbsoluteOffsetAndSize(INDEX_GENERATOR_DATA_VERSION_FILE_TAG); MmapReader fileReader(filename); ReaderPtr reader(fileReader.CreateSubReader(offsetsAndSize.first, offsetsAndSize.second)); std::string result; reader.ReadAsString(result); return result; } } // namespace indexer