MCPcopy Create free account
hub / github.com/F-Stack/f-stack / main

Function main

freebsd/contrib/zstd/examples/dictionary_decompression.c:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77
78int 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}

Callers

nothing calls this directly

Calls 4

createDict_orDieFunction · 0.85
decompressFunction · 0.70
printfFunction · 0.50
ZSTD_freeDDictFunction · 0.50

Tested by

no test coverage detected