]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
zlibWrapper: minor tweaks 384/head
authorinikep <inikep@gmail.com>
Mon, 26 Sep 2016 20:47:39 +0000 (22:47 +0200)
committerinikep <inikep@gmail.com>
Mon, 26 Sep 2016 20:47:39 +0000 (22:47 +0200)
zlibWrapper/Makefile
zlibWrapper/README.md
zlibWrapper/zstd_zlibwrapper.c

index 42a8d32d52232971968c1eae459438aa4b74d516..69c976fa56c99ce20c08d1645d38f01b817f6305 100644 (file)
@@ -32,7 +32,7 @@ test: example fitblk example_zstd fitblk_zstd zwrapbench
        ./fitblk_zstd 10240 <../zstd_compression_format.md
        ./fitblk_zstd 40960 <../zstd_compression_format.md
        ./zwrapbench -qb3B1K ../zstd_compression_format.md
-       ./zwrapbench -qb1e5r ../lib ../programs ../tests
+       ./zwrapbench -rqb1e5 ../lib ../programs ../tests
 
 #valgrindTest: ZSTDLIBRARY = $(ZSTDLIBDIR)/libzstd.so
 valgrindTest: VALGRIND = LD_LIBRARY_PATH=$(ZSTDLIBDIR) valgrind --track-origins=yes --leak-check=full --error-exitcode=1
@@ -45,7 +45,7 @@ valgrindTest: clean example fitblk example_zstd fitblk_zstd zwrapbench
        $(VALGRIND) ./fitblk_zstd 10240 <../zstd_compression_format.md
        $(VALGRIND) ./fitblk_zstd 40960 <../zstd_compression_format.md
        $(VALGRIND) ./zwrapbench -qb3B1K ../zstd_compression_format.md
-       $(VALGRIND) ./zwrapbench -qb1e5 ../lib ../programs ../tests
+       $(VALGRIND) ./zwrapbench -rqb1e5 ../lib ../programs ../tests
 
 .c.o:
        $(CC) $(CFLAGS) -c -o $@ $<
index a3d161f27f470d750b0ae4846cd26cd0f030ad1c..163009a8ba72babe6394c99ad349679c6ca7ad88 100644 (file)
@@ -102,7 +102,7 @@ The speed of compression can be improved with reusing a single context with foll
 - free the context with `deflateEnd`
 
 To check the difference we made experiments using `zwrapbench -ri6b6` with zstd and zlib compression (both at level 6).
-The input data was decompressed git repository downloaded from https://github.com/git/git/archive/master.zip that contains 2979 files.
+The input data was decompressed git repository downloaded from https://github.com/git/git/archive/master.zip which contains 2979 files.
 The table below shows that reusing contexts has a minor influence on zlib but it gives improvement for zstd.
 In our example (the last 2 lines) it gives 4% better compression speed and 5% better decompression speed.
 
index 524ca78689781b725b5e7b80f20f2a6333479a50..3464c600d8a9e8cdf0c414cf8bc88eb4b47f00c9 100644 (file)
@@ -260,7 +260,7 @@ ZEXTERN int ZEXPORT z_deflate OF((z_streamp strm, int flush))
     if (zwc->zbc == NULL) {
         int res;
         zwc->zbc = ZSTD_createCStream_advanced(zwc->customMem);
-        if (zwc->zbc == NULL) return ZWRAPC_finishWithError(zwc, strm, res); 
+        if (zwc->zbc == NULL) return ZWRAPC_finishWithError(zwc, strm, 0); 
         res = ZWRAP_initializeCStream(zwc, NULL, 0, (flush == Z_FINISH) ? strm->avail_in : 0);
         if (res != Z_OK) return ZWRAPC_finishWithError(zwc, strm, res);
     } else {