diff options
Diffstat (limited to 'src/index.h')
-rw-r--r-- | src/index.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/index.h b/src/index.h new file mode 100644 index 0000000..50acb2e --- /dev/null +++ b/src/index.h @@ -0,0 +1,29 @@ +#pragma once + +#include <string> +#include <vector> +#include <cstdint> + +namespace dictzip { + +class IndexFile { +public: + struct Entry { + Entry(const std::string& line); + Entry(const std::string& word, std::size_t offset, std::size_t length); + + const std::string word; + const std::size_t offset; + const std::size_t length; + }; + + IndexFile(const std::string& path); + + std::vector<Entry> get(const std::string& word); + +private: + const std::string path_; + +}; + +} |