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

Function main

freebsd/contrib/zstd/examples/streaming_compression.c:105–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105int main(int argc, const char** argv)
106{
107 const char* const exeName = argv[0];
108
109 if (argc!=2) {
110 printf("wrong arguments\n");
111 printf("usage:\n");
112 printf("%s FILE\n", exeName);
113 return 1;
114 }
115
116 const char* const inFilename = argv[1];
117
118 char* const outFilename = createOutFilename_orDie(inFilename);
119 compressFile_orDie(inFilename, outFilename, 1);
120
121 free(outFilename); /* not strictly required, since program execution stops there,
122 * but some static analyzer main complain otherwise */
123 return 0;
124}

Callers

nothing calls this directly

Calls 4

createOutFilename_orDieFunction · 0.70
compressFile_orDieFunction · 0.70
printfFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected