Raptor
A fast and space-efficient pre-filter
All Classes Namespaces Files Functions Variables Macros Pages Concepts
store_index.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <filesystem>
13#include <fstream>
14
15#include <raptor/index.hpp>
17
18namespace raptor
19{
20
21template <typename data_t>
22static inline void store_index(std::filesystem::path const & path, raptor_index<data_t> && index)
23{
24 std::ofstream os{path, std::ios::binary};
25 cereal::BinaryOutputArchive oarchive{os};
26 oarchive(index);
27}
28
29} // namespace raptor
Provides raptor::raptor_index.
Provides raptor::window.
Hide me