]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
clarified tests
authorYann Collet <cyan@fb.com>
Thu, 8 Sep 2016 17:39:00 +0000 (19:39 +0200)
committerYann Collet <cyan@fb.com>
Thu, 8 Sep 2016 17:39:00 +0000 (19:39 +0200)
examples/Makefile
examples/README.md
examples/streaming_decompression.c

index fa7328fbd99db1c2e4ea13c9d9d5e1d92ed8eae8..f568bc00c341c8209e73e0821d019fe700f4d8ba 100644 (file)
@@ -67,7 +67,7 @@ test: all
        ./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
index 2f460388150e02c47f204328d5f95aad3d1ac902..d00fa0d76e227d133b5eddfcd0983258ba573397 100644 (file)
@@ -7,6 +7,8 @@ Zstandard library : usage examples
 
 - [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)
@@ -15,4 +17,15 @@ Zstandard library : usage examples
 
 - [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()`
index 62c780267ee1a732be1724978e3224171e1b4aee..2966ec6ea3818d1d9d69dd9f8edf797b78aa725b 100644 (file)
@@ -99,14 +99,12 @@ int main(int argc, const char** argv)
     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;
 }