| 292 | } |
| 293 | |
| 294 | bool ZipUtils::isCCZFile(const char *path) { |
| 295 | // load file into memory |
| 296 | Data compressedData = FileUtils::getInstance()->getDataFromFile(path); |
| 297 | |
| 298 | if (compressedData.isNull()) { |
| 299 | CC_LOG_DEBUG("ZipUtils: loading file failed"); |
| 300 | return false; |
| 301 | } |
| 302 | |
| 303 | return isCCZBuffer(compressedData.getBytes(), compressedData.getSize()); |
| 304 | } |
| 305 | |
| 306 | bool ZipUtils::isCCZBuffer(const unsigned char *buffer, uint32_t len) { |
| 307 | if (len < sizeof(struct CCZHeader)) { |
nothing calls this directly
no test coverage detected