1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-05 19:15:58 +03:00

changed -B# command into --jobsize

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.
This commit is contained in:
Yann Collet
2025-03-04 13:17:10 -08:00
parent fcfb3160dc
commit 19ffcf81b8
2 changed files with 6 additions and 5 deletions

View 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 `--zstd`=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6
### -B#: ### --jobsize=#:
Specify the size of each compression job. Specify the size of each compression job.
This parameter is only available when multi-threading is enabled. This parameter is only meaningful when multi-threading is enabled.
Each compression job is run in parallel, so this value indirectly impacts the nb of active threads. 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`). 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. Note that job size must respect a minimum value which is enforced transparently.
This minimum is either 512 KB, or `overlapSize`, whichever is largest. This minimum is either 512 KB, or `overlapSize`, whichever is largest.
Different job sizes will lead to non-identical compressed frames. Different job sizes will lead to non-identical compressed frames.

View File

@@ -1084,6 +1084,7 @@ int main(int argCount, const char* argv[])
if (longCommandWArg(&argument, "--memlimit-decompress")) { NEXT_UINT32(memLimit); continue; } 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, "--block-size")) { NEXT_TSIZE(chunkSize); continue; } /* hidden command, prefer --split below */
if (longCommandWArg(&argument, "--split")) { NEXT_TSIZE(chunkSize); continue; } 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, "--maxdict")) { NEXT_UINT32(maxDictSize); continue; }
if (longCommandWArg(&argument, "--dictID")) { NEXT_UINT32(dictID); 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; } 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); bench_nbSeconds = readU32FromChar(&argument);
break; break;
/* cut input into independent chunks (benchmark only) */ /* hidden shortcut for --split=# and --jobsize=# */
case 'B': case 'B':
argument++; argument++;
chunkSize = readU32FromChar(&argument); chunkSize = readU32FromChar(&argument);