From: Yann Collet Date: Sun, 9 Feb 2025 06:47:05 +0000 (-0800) Subject: --ultra automatically triggered with --long and --patch-from X-Git-Tag: v1.5.7^2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aebffd66ec43a721b9d07e67e18f353bf2082430;p=thirdparty%2Fzstd.git --ultra automatically triggered with --long and --patch-from the purpose of --ultra is to make the user explicitly opt-in to generate very large window size (> 8 MB). The agreement to generate very large window size is already implicit when selecting --long or --patch-from. Consequently, `--ultra ` is automatically enabled when `--long` or `--patch-from` is set. --- diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 7d00a94b2..8569896c0 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -1082,10 +1082,11 @@ int main(int argCount, const char* argv[]) #ifndef ZSTD_NOTRACE if (longCommandWArg(&argument, "--trace")) { char const* traceFile; NEXT_FIELD(traceFile); TRACE_enable(traceFile); continue; } #endif - if (longCommandWArg(&argument, "--patch-from")) { NEXT_FIELD(patchFromDictFileName); continue; } + if (longCommandWArg(&argument, "--patch-from")) { NEXT_FIELD(patchFromDictFileName); ultra = 1; continue; } if (longCommandWArg(&argument, "--long")) { unsigned ldmWindowLog = 0; ldmFlag = 1; + ultra = 1; /* Parse optional window log */ if (*argument == '=') { ++argument;