mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
zlibWrapper: minor tweaks
This commit is contained in:
@ -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 $@ $<
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user