From a3cb97b0388eef9a81fff89c11e3da6e2cd77612 Mon Sep 17 00:00:00 2001 From: Jennifer Liu Date: Wed, 20 Jun 2018 14:23:14 -0700 Subject: [PATCH 1/7] set up sample config.yml --- circleci/.config.yml.swo | Bin 0 -> 4096 bytes circleci/config.yml | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 circleci/.config.yml.swo create mode 100644 circleci/config.yml diff --git a/circleci/.config.yml.swo b/circleci/.config.yml.swo new file mode 100644 index 0000000000000000000000000000000000000000..b1cd77710ed6ef2ec3ebd48aad50a713f0f0f637 GIT binary patch literal 4096 zcmYc?2=nw+u+TGLU|?Vn01*%@kj}`Em715AnU-3VlUZtJ1Xci%Lno2c>Eba86cMQdAHY3Z;UXqehH|z-S1JhQMeDjE2By2#kinXb6mkz-R~zl@I^`okt=H literal 0 HcmV?d00001 diff --git a/circleci/config.yml b/circleci/config.yml new file mode 100644 index 000000000..65e6c33bb --- /dev/null +++ b/circleci/config.yml @@ -0,0 +1,13 @@ +version: 2 +jobs: + build: + docker: + - image: debian:stretch + steps: + - checkout + - run: + name: Greeting + command: echo Hello, world. + - run: + name: Print the Current Time + command: date From aef8486fee3e06114d6e8d5b736abb22b6e1f975 Mon Sep 17 00:00:00 2001 From: Jennifer Liu Date: Wed, 27 Jun 2018 14:27:27 -0700 Subject: [PATCH 2/7] Make fast=0 fail --- circleci/.config.yml.swo | Bin 4096 -> 0 bytes circleci/config.yml | 13 ------------- programs/zstdcli.c | 2 ++ tests/playTests.sh | 7 ++++--- 4 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 circleci/.config.yml.swo delete mode 100644 circleci/config.yml diff --git a/circleci/.config.yml.swo b/circleci/.config.yml.swo deleted file mode 100644 index b1cd77710ed6ef2ec3ebd48aad50a713f0f0f637..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmYc?2=nw+u+TGLU|?Vn01*%@kj}`Em715AnU-3VlUZtJ1Xci%Lno2c>Eba86cMQdAHY3Z;UXqehH|z-S1JhQMeDjE2By2#kinXb6mkz-R~zl@I^`okt=H diff --git a/circleci/config.yml b/circleci/config.yml deleted file mode 100644 index 65e6c33bb..000000000 --- a/circleci/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: debian:stretch - steps: - - checkout - - run: - name: Greeting - command: echo Hello, world. - - run: - name: Print the Current Time - command: date diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 6b6a93528..ad473e330 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -568,6 +568,8 @@ int main(int argCount, const char* argv[]) fastLevel = readU32FromChar(&argument); if (fastLevel) { dictCLevel = cLevel = -(int)fastLevel; + } else { + CLEAN_RETURN(badusage(programName)); } } else if (*argument != 0) { /* Invalid character following --fast */ diff --git a/tests/playTests.sh b/tests/playTests.sh index 52d4dd0b9..9f30f29ec 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -108,6 +108,7 @@ $ECHO "test : --fast aka negative compression levels" $ZSTD --fast -f tmp # == -1 $ZSTD --fast=3 -f tmp # == -3 $ZSTD --fast=200000 -f tmp # == no compression +! $ZSTD -c --fast=0 tmp # should fail $ECHO "test : too large numeric argument" $ZSTD --fast=9999999999 -f tmp && die "should have refused numeric value" $ECHO "test : compress to stdout" @@ -532,7 +533,7 @@ fi if [ $GZIPMODE -eq 1 ]; then ./datagen > tmp rm -f tmp.zst - $ZSTD --format=gzip --format=zstd -f tmp + $ZSTD --format=gzip --format=zstd -f tmp test -f tmp.zst fi @@ -637,11 +638,11 @@ $ECHO "\n===> suffix list test" ! $ZSTD -d tmp.abc 2> tmplg -if [ $GZIPMODE -ne 1 ]; then +if [ $GZIPMODE -ne 1 ]; then grep ".gz" tmplg > $INTOVOID && die "Unsupported suffix listed" fi -if [ $LZMAMODE -ne 1 ]; then +if [ $LZMAMODE -ne 1 ]; then grep ".lzma" tmplg > $INTOVOID && die "Unsupported suffix listed" grep ".xz" tmplg > $INTOVOID && die "Unsupported suffix listed" fi From c10561c752503e55473fad4cee9428ec87dc0f65 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 27 Jun 2018 19:15:38 -0400 Subject: [PATCH 3/7] poolTests.c: Fix Interval Var Type --- tests/poolTests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/poolTests.c b/tests/poolTests.c index 6a058a5a3..9661b5299 100644 --- a/tests/poolTests.c +++ b/tests/poolTests.c @@ -105,7 +105,8 @@ void waitLongFn(void *opaque) { static int testThreadReduction_internal(POOL_ctx* ctx, poolTest_t test) { int const nbWaits = 16; - UTIL_time_t startTime, time4threads, time2threads; + UTIL_time_t startTime; + U64 time4threads, time2threads; test.val = 0; test.max = nbWaits; From a02ecffb7a58f11999c91aaeaf552e2ec293b2cc Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 27 Jun 2018 19:21:42 -0400 Subject: [PATCH 4/7] Also Run test-pool Target in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 081af4aad..faddfed5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: - env: Cmd='make ppcinstall && make ppc64fuzz' - env: Cmd='make -j uasanregressiontest && make clean && make -j msanregressiontest' - - env: Cmd='make lz4install && make -C tests test-lz4' + - env: Cmd='make lz4install && make -C tests test-lz4 test-pool' - env: Cmd='bash tests/libzstd_partial_builds.sh' From 71d27aaafbacd453ebe9b73891d11451553a78fd Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 27 Jun 2018 19:25:39 -0400 Subject: [PATCH 5/7] Consolidate Fast-Running Travis Jobs --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index faddfed5c..b7099c24f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,7 @@ matrix: - env: Cmd='make ppcinstall && make ppc64fuzz' - env: Cmd='make -j uasanregressiontest && make clean && make -j msanregressiontest' - - env: Cmd='make lz4install && make -C tests test-lz4 test-pool' - - - env: Cmd='bash tests/libzstd_partial_builds.sh' + - env: Cmd='make lz4install && make -C tests test-lz4 test-pool && make clean && bash tests/libzstd_partial_builds.sh' # tag-specific test - if: tag =~ ^v[0-9]\.[0-9] From 1ab57a7ce1dcf09b3fa59bfe51c5bdcb5ba5bdb7 Mon Sep 17 00:00:00 2001 From: Jennifer Liu Date: Wed, 27 Jun 2018 16:27:45 -0700 Subject: [PATCH 6/7] Redirect failed test result to INTOVOID and update comment about parsing fast command --- programs/zstdcli.c | 2 +- tests/playTests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/zstdcli.c b/programs/zstdcli.c index ad473e330..ae8c9cba9 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -561,7 +561,7 @@ int main(int argCount, const char* argv[]) continue; } if (longCommandWArg(&argument, "--fast")) { - /* Parse optional window log */ + /* Parse optional acceleration factor */ if (*argument == '=') { U32 fastLevel; ++argument; diff --git a/tests/playTests.sh b/tests/playTests.sh index 9f30f29ec..09a7377f2 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -108,7 +108,7 @@ $ECHO "test : --fast aka negative compression levels" $ZSTD --fast -f tmp # == -1 $ZSTD --fast=3 -f tmp # == -3 $ZSTD --fast=200000 -f tmp # == no compression -! $ZSTD -c --fast=0 tmp # should fail +! $ZSTD -c --fast=0 tmp > $INTOVOID # should fail $ECHO "test : too large numeric argument" $ZSTD --fast=9999999999 -f tmp && die "should have refused numeric value" $ECHO "test : compress to stdout" From 1fd621ff6d0efd1100fb5839fa694184330cdd07 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 27 Jun 2018 18:42:11 -0700 Subject: [PATCH 7/7] minor man page update regarding advanced parameter `tlen` which was recently changed. `0` in association with `ZSTD_fast` now means "normal fast mode". --- programs/zstd.1 | 8 ++++---- programs/zstd.1.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/zstd.1 b/programs/zstd.1 index 507933c97..b136bb33e 100644 --- a/programs/zstd.1 +++ b/programs/zstd.1 @@ -1,5 +1,5 @@ . -.TH "ZSTD" "1" "2018-05-12" "zstd 1.3.4" "User Commands" +.TH "ZSTD" "1" "2018-06-27" "zstd 1.3.5" "User Commands" . .SH "NAME" \fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files @@ -160,7 +160,7 @@ operate recursively on dictionaries . .TP \fB\-\-format=FORMAT\fR -compress and decompress in other formats\. If compiled with support, zstd can compress to or decompress from other compression algorithm formats\. Possibly available options are \fBgzip\fR, \fBxz\fR, \fBlzma\fR, and \fBlz4\fR\. +compress and decompress in other formats\. If compiled with support, zstd can compress to or decompress from other compression algorithm formats\. Possibly available options are \fBzstd\fR, \fBgzip\fR, \fBxz\fR, \fBlzma\fR, and \fBlz4\fR\. If no such format is provided, \fBzstd\fR is the default\. . .TP \fB\-h\fR/\fB\-H\fR, \fB\-\-help\fR @@ -349,13 +349,13 @@ The impact of this field vary depending on selected strategy\. For ZSTD_btopt and ZSTD_btultra, it specifies the minimum match length that causes match finder to stop searching for better matches\. A larger \fBtargetLen\fR usually improves compression ratio but decreases compression speed\. . .IP -For ZSTD_fast, it specifies the amount of data skipped between match sampling\. Impact is reversed : a larger \fBtargetLen\fR increases compression speed but decreases compression ratio\. +For ZSTD_fast, it triggers ultra\-fast mode when > 0\. The value represents the amount of data skipped between match sampling\. Impact is reversed : a larger \fBtargetLen\fR increases compression speed but decreases compression ratio\. . .IP For all other strategies, this field has no impact\. . .IP -The minimum \fItlen\fR is 1 and the maximum is 999\. +The minimum \fItlen\fR is 0 and the maximum is 999\. . .TP \fBoverlapLog\fR=\fIovlog\fR, \fBovlog\fR=\fIovlog\fR diff --git a/programs/zstd.1.md b/programs/zstd.1.md index 4b3818141..c8b8d8d72 100644 --- a/programs/zstd.1.md +++ b/programs/zstd.1.md @@ -355,14 +355,14 @@ The list of available _options_: A larger `targetLen` usually improves compression ratio but decreases compression speed. - For ZSTD\_fast, it specifies - the amount of data skipped between match sampling. + For ZSTD\_fast, it triggers ultra-fast mode when > 0. + The value represents the amount of data skipped between match sampling. Impact is reversed : a larger `targetLen` increases compression speed but decreases compression ratio. For all other strategies, this field has no impact. - The minimum _tlen_ is 1 and the maximum is 999. + The minimum _tlen_ is 0 and the maximum is 999. - `overlapLog`=_ovlog_, `ovlog`=_ovlog_: Determine `overlapSize`, amount of data reloaded from previous job.