| 7 | #include "rabbitizer.hpp" |
| 8 | |
| 9 | static std::vector<uint8_t> read_file(const std::filesystem::path& path, bool& found) { |
| 10 | std::vector<uint8_t> ret; |
| 11 | found = false; |
| 12 | |
| 13 | std::ifstream file{ path, std::ios::binary}; |
| 14 | |
| 15 | if (file.good()) { |
| 16 | file.seekg(0, std::ios::end); |
| 17 | ret.resize(file.tellg()); |
| 18 | file.seekg(0, std::ios::beg); |
| 19 | |
| 20 | file.read(reinterpret_cast<char*>(ret.data()), ret.size()); |
| 21 | found = true; |
| 22 | } |
| 23 | |
| 24 | return ret; |
| 25 | } |
| 26 | |
| 27 | int main(int argc, const char** argv) { |
| 28 | if (argc != 5) { |