// // EuropaTools // // (C) 2021-2022 modeco80 // // SPDX-License-Identifier: GPL-3.0-or-later // #ifndef EUROPA_IO_PAKWRITER_H #define EUROPA_IO_PAKWRITER_H #include #include #include #include #include namespace europa::io { /** * Writer for package files. */ struct PakWriter { void Init(structs::PakHeader::Version version); // TODO: accessor for header // use flattened vector format anyhow (less allocs, higher perf) std::unordered_map& GetFiles(); /** * Write the resulting archive to the given output stream. */ void Write(std::ostream& os, PakProgressReportSink& sink); private: structs::PakHeader pakHeader {}; std::unordered_map archiveFiles; }; } // namespace europa::io #endif // EUROPA_IO_PAKWRITER_H