./streaming_decompression tmp.zst > /dev/null
@echo starting streaming compression
./streaming_compression tmp
- ./streaming_decompression tmp.zst
+ ./streaming_decompression tmp.zst > /dev/null
@echo starting dictionary compression
./dictionary_compression tmp README.md
./dictionary_decompression tmp.zst README.md
- [Simple decompression](simple_decompression.c)
Decompress a single file compressed by zstd.
+ Only compatible with simple compression.
+ Result remains in memory.
Introduces usage of : `ZSTD_decompress()`
- [Dictionary compression](dictionary_compression.c)
- [Dictionary decompression](dictionary_decompression.c)
Decompress multiple files using the same dictionary.
+ Result remains in memory.
Introduces usage of : `ZSTD_createDDict()` and `ZSTD_decompress_usingDDict()`
+
+- [Streaming compression](streaming_compression.c)
+ Compress a single file.
+ Introduces usage of : `ZSTD_compressStream()`
+
+- [Streaming decompression](streaming_decompression.c)
+ Decompress a single file compressed by zstd.
+ Compatible with simple and streaming compression.
+ Result is sent to stdout.
+ Introduces usage of : `ZSTD_decompressStream()`
const char* const inFilename = argv[1];
if (argc!=2) {
- printf("wrong arguments\n");
- printf("usage:\n");
- printf("%s FILE\n", exeName);
+ fprintf(stderr, "wrong arguments\n");
+ fprintf(stderr, "usage:\n");
+ fprintf(stderr, "%s FILE\n", exeName);
return 1;
}
decompressFile_orDie(inFilename);
- printf("%s correctly decoded (in memory). \n", inFilename);
-
return 0;
}