#include namespace PD { namespace IO { std::vector LoadFile2Mem(const std::string& path) { std::ifstream iff(path, std::ios::binary); if (!iff) { return std::vector(); } iff.seekg(0, std::ios::end); size_t szs = iff.tellg(); iff.seekg(0, std::ios::beg); std::vector res(szs, 0); iff.read(reinterpret_cast(res.data()), res.size()); iff.close(); return res; } u32 HashMemory(const std::vector& data) { u32 hash = 4477; for (auto& it : data) { hash = (hash * 33) + it; } return hash; } } // namespace IO } // namespace PD