| 163 | } |
| 164 | |
| 165 | static bool ReadFileIntoVector(FILE* inputFile, std::vector<char>& vector) |
| 166 | { |
| 167 | if (fseek(inputFile, 0, SEEK_END)) |
| 168 | return false; |
| 169 | long fileSize = ftell(inputFile); |
| 170 | if (fseek(inputFile, 0, SEEK_SET)) |
| 171 | return false; |
| 172 | vector.resize(fileSize); |
| 173 | if (fread(vector.data(), fileSize, 1, inputFile) != 1) |
| 174 | return false; |
| 175 | return true; |
| 176 | } |
| 177 | |
| 178 | std::optional<ntc::BlockCompressedFormat> ParseBlockCompressedFormat(char const* format, bool enableAuto) |
| 179 | { |
no outgoing calls
no test coverage detected