File tree 2 files changed +7
-1
lines changed 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,8 @@ static void usageAdvanced(const char* programName)
230
230
#endif
231
231
DISPLAYOUT (" --adapt Dynamically adapt compression level to I/O conditions.\n" );
232
232
DISPLAYOUT (" --long[=#] Enable long distance matching with window log #. [Default: %u]\n" , g_defaultMaxWindowLog );
233
- DISPLAYOUT (" --patch-from=REF Use REF as the reference point for Zstandard's diff engine. \n\n" );
233
+ DISPLAYOUT (" --patch-from=REF Use REF as the reference point for Zstandard's diff engine. \n" );
234
+ DISPLAYOUT (" --patch-apply Equivalent for `-d --patch-from` \n\n" );
234
235
# ifdef ZSTD_MULTITHREAD
235
236
DISPLAYOUT (" -T# Spawn # compression threads. [Default: 1; pass 0 for core count.]\n" );
236
237
DISPLAYOUT (" --single-thread Share a single thread for I/O and compression (slightly different than `-T1`).\n" );
@@ -1124,6 +1125,7 @@ int main(int argCount, const char* argv[])
1124
1125
if (longCommandWArg (& argument , "--trace" )) { char const * traceFile ; NEXT_FIELD (traceFile ); TRACE_enable (traceFile ); continue ; }
1125
1126
#endif
1126
1127
if (longCommandWArg (& argument , "--patch-from" )) { NEXT_FIELD (patchFromDictFileName ); ultra = 1 ; continue ; }
1128
+ if (longCommandWArg (& argument , "--patch-apply" )) { operation = zom_decompress ; NEXT_FIELD (patchFromDictFileName ); memLimit = 1U << ZSTD_WINDOWLOG_MAX ; continue ; }
1127
1129
if (longCommandWArg (& argument , "--long" )) {
1128
1130
unsigned ldmWindowLog = 0 ;
1129
1131
ldmFlag = 1 ;
Original file line number Diff line number Diff line change @@ -1777,11 +1777,15 @@ datagen -g1000 -P10 > tmp_patch
1777
1777
zstd --patch-from=tmp_dict tmp_patch -o tmp_patch_diff
1778
1778
zstd -d --patch-from=tmp_dict tmp_patch_diff -o tmp_patch_recon
1779
1779
$DIFF -s tmp_patch_recon tmp_patch
1780
+ zstd -f --patch-apply=tmp_dict tmp_patch_diff -o tmp_patch_recon
1781
+ $DIFF -s tmp_patch_recon tmp_patch
1780
1782
1781
1783
println " \n===> alternate syntax: patch-from origin"
1782
1784
zstd -f --patch-from tmp_dict tmp_patch -o tmp_patch_diff
1783
1785
zstd -df --patch-from tmp_dict tmp_patch_diff -o tmp_patch_recon
1784
1786
$DIFF -s tmp_patch_recon tmp_patch
1787
+ zstd -f --patch-apply tmp_dict tmp_patch_diff -o tmp_patch_recon
1788
+ $DIFF -s tmp_patch_recon tmp_patch
1785
1789
rm -rf tmp_*
1786
1790
1787
1791
println " \n===> patch-from recursive tests"
You can’t perform that action at this time.
0 commit comments