]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
changed -B# command into --jobsize
authorYann Collet <cyan@fb.com>
Tue, 4 Mar 2025 21:17:10 +0000 (13:17 -0800)
committerYann Collet <cyan@fb.com>
Tue, 4 Mar 2025 21:17:10 +0000 (13:17 -0800)
to reduce confusion with the term "block".

-B# remains supported for existing scripts,
but it's no longer documented, so it's effectively a hidden shortcut.

programs/zstd.1.md
programs/zstdcli.c

index 3b7bc342a53ff6df2d9320f66d8329ac354c29e9..cf1810d59b186d96cc7a63a30c4662b4b83e431d 100644 (file)
@@ -503,12 +503,12 @@ similar to predefined level 19 for files bigger than 256 KB:
 
 `--zstd`=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6
 
-### -B#:
+### --jobsize=#:
 Specify the size of each compression job.
-This parameter is only available when multi-threading is enabled.
-Each compression job is run in parallel, so this value indirectly impacts the nb of active threads.
+This parameter is only meaningful when multi-threading is enabled.
+Each compression job is run in parallel, so this value can indirectly impact the nb of active threads.
 Default job size varies depending on compression level (generally  `4 * windowSize`).
-`-B#` makes it possible to manually select a custom size.
+`--jobsize=#` makes it possible to manually select a custom size.
 Note that job size must respect a minimum value which is enforced transparently.
 This minimum is either 512 KB, or `overlapSize`, whichever is largest.
 Different job sizes will lead to non-identical compressed frames.
index 7395e9585e07f5f15d85c3577dd1df895193cd08..4b7f496d0109efa92c603f2c5c588687fc2c7525 100644 (file)
@@ -1084,6 +1084,7 @@ int main(int argCount, const char* argv[])
                 if (longCommandWArg(&argument, "--memlimit-decompress")) { NEXT_UINT32(memLimit); continue; }
                 if (longCommandWArg(&argument, "--block-size")) { NEXT_TSIZE(chunkSize); continue; } /* hidden command, prefer --split below */
                 if (longCommandWArg(&argument, "--split")) { NEXT_TSIZE(chunkSize); continue; }
+                if (longCommandWArg(&argument, "--jobsize")) { NEXT_TSIZE(chunkSize); continue; } /* note: overloaded variable */
                 if (longCommandWArg(&argument, "--maxdict")) { NEXT_UINT32(maxDictSize); continue; }
                 if (longCommandWArg(&argument, "--dictID")) { NEXT_UINT32(dictID); continue; }
                 if (longCommandWArg(&argument, "--zstd=")) { if (!parseCompressionParameters(argument, &compressionParams)) { badUsage(programName, originalArgument); CLEAN_RETURN(1); } ; cType = FIO_zstdCompression; continue; }
@@ -1266,7 +1267,7 @@ int main(int argCount, const char* argv[])
                     bench_nbSeconds = readU32FromChar(&argument);
                     break;
 
-                    /* cut input into independent chunks (benchmark only) */
+                    /* hidden shortcut for --split=# and --jobsize=# */
                 case 'B':
                     argument++;
                     chunkSize = readU32FromChar(&argument);