]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xz: Update --long-help and man page for new --filters option.
authorJia Tan <jiat0218@gmail.com>
Thu, 5 Jan 2023 16:03:06 +0000 (00:03 +0800)
committerJia Tan <jiat0218@gmail.com>
Mon, 17 Jul 2023 15:34:55 +0000 (23:34 +0800)
src/xz/message.c
src/xz/xz.1

index c54ebc5b58008efea07dc2c9d4fe0ce66284c33a..b9fdc51087b6d4c44d77a8a4d18414aab5784ba2 100644 (file)
@@ -1057,6 +1057,12 @@ message_help(bool long_help)
                puts(_(
 "\n Custom filter chain for compression (alternative for using presets):"));
 
+               puts(_(
+"\n"
+"  --filters=FILTERS   set the filter chain using the liblzma filter string\n"
+"                      syntax; use --filters-help for more information"
+               ));
+
 #if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) \
                || defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
                // TRANSLATORS: The word "literal" in "literal context bits"
index aefb79f2fdc09e433b8949fcf24bb2fd591b7d34..004add7aae453b643e3b06a2878ea200ee43be29 100644 (file)
@@ -1295,15 +1295,24 @@ in the chain.
 Depending on the filter, this limitation is either inherent to
 the filter design or exists to prevent security issues.
 .PP
-A custom filter chain is specified by using one or more
-filter options in the order they are wanted in the filter chain.
-That is, the order of filter options is significant!
+A custom filter chain is specified in two different ways.
+The option
+.BI \-\-filters= filters
+allows specifying the entire filter chain in one option.
+Alternatively, filter chains can be specified by using one or more
+individual filter options in the order they are wanted in the filter chain.
+That is, the order of individual filter options is significant!
 When decoding raw streams
 .RB ( \-\-format=raw ),
-the filter chain is specified in the same order as
+the filter chain must be specified in the same order as
 it was specified when compressing.
+Any individual filters or presets specified before the full chain option
+(\fB\-\-filters=\fIfilters\fR)
+will be forgotten.
+Individual filters specified after the full chain option will reset the
+filter chain.
 .PP
-Filters take filter-specific
+Both the full and individual filter options take filter-specific
 .I options
 as a comma-separated list.
 Extra commas in
@@ -1321,6 +1330,28 @@ use
 twice).
 This works also for viewing the filter chain options used by presets.
 .TP
+\fB\-\-filters\fR\fB=\fIfilters\fR
+.PD
+Specify the full filter chain or a preset in a single option.
+Each filter can be separated by spaces or two dashes
+.RB ( \-\- ).
+.I filters
+may need to be quoted on the shell command line so it is
+parsed as a single option.
+To denote
+.IR options ,
+use
+.B :
+or
+.BR = .
+A preset can be prefixed with a
+.B \-
+and followed with zero or more flags.
+The only supported flag is
+.B e
+to apply the same options as
+.BR \-\-extreme .
+.TP
 \fB\-\-lzma1\fR[\fB=\fIoptions\fR]
 .PD 0
 .TP