#pragma once #include #include #include #include namespace hex { template struct SizeSorter { bool operator() (const T& lhs, const T& rhs) const { return lhs.size() < rhs.size(); } }; class EncodingFile { public: enum class Type { Thingy, CSV }; EncodingFile() = default; EncodingFile(Type type, const std::string &path); [[nodiscard]] std::pair getEncodingFor(const std::vector &buffer) const; [[nodiscard]] size_t getLongestSequence() const { return this->m_longestSequence; } private: void parseThingyFile(std::ifstream &content); std::map, std::string>> m_mapping; size_t m_longestSequence = 0; }; }