| 74 | }; |
| 75 | |
| 76 | static std::string read_file(const std::string & path) { |
| 77 | std::ifstream fin(path, std::ios::binary); |
| 78 | if (!fin.is_open()) { |
| 79 | throw std::runtime_error("Could not open file: " + path); |
| 80 | } |
| 81 | std::ostringstream buf; |
| 82 | buf << fin.rdbuf(); |
| 83 | return buf.str(); |
| 84 | } |
| 85 | |
| 86 | static void print_usage(const char * program_name) { |
| 87 | LOG_ERR("Usage: %s [options]\n", program_name); |