#pragma once #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, std::string_view path); std::pair getEncodingFor(const std::vector &buffer) const; 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; }; }