]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
updated test-gzstd
authorPrzemyslaw Skibinski <inikep@gmail.com>
Mon, 5 Dec 2016 17:02:40 +0000 (18:02 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Mon, 5 Dec 2016 17:02:40 +0000 (18:02 +0100)
programs/fileio.c
tests/Makefile

index 743a5ec5fcabe41a48eac3d3163cb986d0000c3f..f860145b480769c1052b54a84f9489661838c3ac 100644 (file)
@@ -35,6 +35,9 @@
 #include "zstd.h"
 #ifdef ZSTD_GZDECOMPRESS
 #include "zlib.h"
+#if !defined(z_const)
+    #define z_const
+#endif
 #endif
 
 
@@ -632,7 +635,7 @@ unsigned long long FIO_decompressFrame(dRess_t* ress,
         if (ZSTD_isError(readSizeHint)) EXM_THROW(36, "Decoding error : %s", ZSTD_getErrorName(readSizeHint));
 
         /* Write block */
-        storedSkips = FIO_fwriteSparse(ress->dstFile, ress->dstBuffer, outBuff.pos, storedSkips);
+        storedSkips = FIO_fwriteSparse(ress->dstFile, ress->dstBuffer, outBuff.pos, storedSkips);       
         frameSize += outBuff.pos;
         DISPLAYUPDATE(2, "\rDecoded : %u MB...     ", (U32)((alreadyDecoded+frameSize)>>20) );
 
index ca899d2f8ab3ef99fbe29743afb16830fb2c2462..ad367595a332c5d403bbcf2af989129126f0d332 100644 (file)
@@ -194,9 +194,14 @@ test-zstd-nolegacy: ZSTD = $(PRGDIR)/zstd
 test-zstd-nolegacy: zstd-nolegacy zstd-playTests
 
 test-gzstd: gzstd
+       $(PRGDIR)/zstd README.md test-zstd-speed.py
        gzip README.md test-zstd-speed.py
+       cat README.md.zst test-zstd-speed.py.gz >zstd_gz.zst
+       cat README.md.gz test-zstd-speed.py.zst >gz_zstd.gz
        $(PRGDIR)/zstd -d README.md.gz -o README2.md
        $(PRGDIR)/zstd -d README.md.gz test-zstd-speed.py.gz
+       $(PRGDIR)/zstd -d zstd_gz.zst gz_zstd.gz
+       diff -q zstd_gz gz_zstd
 
 test-fullbench: fullbench datagen
        $(QEMU_SYS) ./fullbench -i1