From d13a75c969d2c48a2e47e6eca1acd9af5abbc92c Mon Sep 17 00:00:00 2001 From: systemcrash Date: Mon, 29 Jan 2018 18:38:02 +0100 Subject: [PATCH 1/3] Update zstd.1 --- programs/zstd.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/zstd.1 b/programs/zstd.1 index 6d772d32..8e9e8374 100644 --- a/programs/zstd.1 +++ b/programs/zstd.1 @@ -1,5 +1,5 @@ . -.TH "ZSTD" "1" "2018-01-27" "zstd 1.3.3" "User Commands" +.TH "ZSTD" "1" "2018-01-27" "zstd 1.3.4" "User Commands" . .SH "NAME" \fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files From 6b5738772830a42ee1cfecb6c6dea2ed38dbdd0c Mon Sep 17 00:00:00 2001 From: systemcrash Date: Mon, 29 Jan 2018 18:42:20 +0100 Subject: [PATCH 2/3] Update README.md spelling --- lib/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/README.md b/lib/README.md index 8a13b4e3..95196e46 100644 --- a/lib/README.md +++ b/lib/README.md @@ -31,7 +31,7 @@ Optional advanced features are exposed via : it unlocks access to advanced experimental API, exposed in second part of `zstd.h`. These APIs are not "stable", their definition may change in the future. - As a consequencem, it shall ___never be used with dynamic library___ ! + As a consequence, it shall ___never be used with dynamic library___ ! Only static linking is allowed. From d6e841d609ad028a89bb77d9f5a059b373bc4288 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 7 Feb 2018 23:13:19 -0800 Subject: [PATCH 3/3] fixed streaming_memory_usage example also: ensure zstd.h is read from ../lib (instead of /usr/include) --- examples/Makefile | 1 + examples/streaming_memory_usage.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 52470f59..2910d23b 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -9,6 +9,7 @@ # This Makefile presumes libzstd is installed, using `sudo make install` +CPPFLAGS += -I../lib LIB = ../lib/libzstd.a .PHONY: default all clean test diff --git a/examples/streaming_memory_usage.c b/examples/streaming_memory_usage.c index b056c2a5..5e7e13e8 100644 --- a/examples/streaming_memory_usage.c +++ b/examples/streaming_memory_usage.c @@ -46,7 +46,7 @@ static unsigned readU32FromChar(const char** stringPtr) int main(int argc, char const *argv[]) { - printf("\n Zstandard (v%u) memory usage for streaming contexts : \n\n", ZSTD_versionNumber()); + printf("\n Zstandard (v%s) memory usage for streaming : \n\n", ZSTD_versionString()); unsigned wLog = 0; if (argc > 1) { @@ -69,11 +69,13 @@ int main(int argc, char const *argv[]) { /* forces compressor to use maximum memory size for given compression level, * by not providing any information on input size */ - ZSTD_parameters params = ZSTD_getParams(compressionLevel, 0, 0); + ZSTD_parameters params = ZSTD_getParams(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, 0); if (wLog) { /* special mode : specific wLog */ printf("Using custom compression parameter : level 1 + wLog=%u \n", wLog); - params = ZSTD_getParams(1, 1 << wLog, 0); - size_t const error = ZSTD_initCStream_advanced(cstream, NULL, 0, params, 0); + params = ZSTD_getParams(1 /*compressionLevel*/, + 1 << wLog /*estimatedSrcSize*/, + 0 /*no dictionary*/); + size_t const error = ZSTD_initCStream_advanced(cstream, NULL, 0, params, ZSTD_CONTENTSIZE_UNKNOWN); if (ZSTD_isError(error)) { printf("ZSTD_initCStream_advanced error : %s \n", ZSTD_getErrorName(error)); return 1;