// // EuropaTools // // (C) 2021-2022 modeco80 // // SPDX-License-Identifier: LGPL-3.0-or-later // #ifndef EUROPA_IO_PAKREADER_H #define EUROPA_IO_PAKREADER_H #include #include #include #include #include namespace europa::io { struct PakReader { struct File { File(std::vector&& data, structs::PakTocEntry& tocData); const std::vector& GetData() const; const structs::PakTocEntry& GetTOCEntry() const; private: std::vector data; structs::PakTocEntry tocData; }; explicit PakReader(std::istream& is); void ReadData(); bool Invalid() const { return invalid; } const std::unordered_map& GetFiles() const; private: std::istream& stream; bool invalid{false}; structs::PakHeader header{}; std::unordered_map tocData; std::unordered_map files; }; } #endif // EUROPA_IO_PAKREADER_H