| 76 | |
| 77 | |
| 78 | int main(int argc, const char** argv) |
| 79 | { |
| 80 | const char* const exeName = argv[0]; |
| 81 | |
| 82 | if (argc<3) { |
| 83 | printf("wrong arguments\n"); |
| 84 | printf("usage:\n"); |
| 85 | printf("%s [FILES] dictionary\n", exeName); |
| 86 | return 1; |
| 87 | } |
| 88 | |
| 89 | /* load dictionary only once */ |
| 90 | const char* const dictName = argv[argc-1]; |
| 91 | ZSTD_DDict* const dictPtr = createDict_orDie(dictName); |
| 92 | |
| 93 | int u; |
| 94 | for (u=1; u<argc-1; u++) decompress(argv[u], dictPtr); |
| 95 | |
| 96 | ZSTD_freeDDict(dictPtr); |
| 97 | printf("All %u files correctly decoded (in memory) \n", argc-2); |
| 98 | return 0; |
| 99 | } |
nothing calls this directly
no test coverage detected