]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix minor details in man page
authorYann Collet <cyan@fb.com>
Thu, 16 Mar 2017 23:33:53 +0000 (16:33 -0700)
committerYann Collet <cyan@fb.com>
Thu, 16 Mar 2017 23:33:53 +0000 (16:33 -0700)
programs/zstd.1
programs/zstd.1.md
programs/zstdcli.c

index 9ac4ca0a8cf980425fce129a3459e6fa429e6f1a..f79b3ce1658a63a7098a11ff4f27499c61e85b42 100644 (file)
@@ -8,7 +8,10 @@
 \fBzstd\fR [\fIOPTIONS\fR] [\-|<INPUT\-FILE>] [\-o <OUTPUT\-FILE>]
 .
 .P
-\fBunzstd\fR is equivalent to \fBzstd \-d\fR \fBzstdcat\fR is equivalent to \fBzstd \-dcf\fR
+\fBunzstd\fR is equivalent to \fBzstd \-d\fR
+.
+.P
+\fBzstdcat\fR is equivalent to \fBzstd \-dcf\fR
 .
 .SH "DESCRIPTION"
 \fBzstd\fR is a fast lossless compression algorithm and data compression tool, with command line syntax similar to \fBgzip (1)\fR and \fBxz (1)\fR\. It is based on the \fBLZ77\fR family, with further FSE & huff0 entropy stages\. \fBzstd\fR offers highly configurable compression speed, with fast modes at > 200 MB/s per code, and strong modes nearing lzma compression ratios\. It also features a very fast decoder, with speeds > 500 MB/s per core\.
@@ -22,10 +25,16 @@ Source files are preserved by default\. It\'s possible to remove them automatica
 .IP "\(bu" 4
 When compressing a single file, \fBzstd\fR displays progress notifications and result summary by default\. Use \fB\-q\fR to turn them off\.
 .
+.IP "\(bu" 4
+\fBzstd\fR does not accept input from console, but it properly accepts \fBstdin\fR when it\'s not the console\.
+.
+.IP "\(bu" 4
+\fBzstd\fR displays a short help page when command line is an error\. Use \fB\-q\fR to turn it off\.
+.
 .IP "" 0
 .
 .P
-\fBzstd\fR compresses or decompresses each \fIfile\fR according to the selected operation mode\. If no \fIfiles\fR are given or \fIfile\fR is \fB\-\fR, \fBzstd\fR reads from standard input and writes the processed data to standard output\. \fBzstd\fR will refuse to (display an error and skip the \fIfile\fR) to write compressed data to standard output if it is a terminal\. Similarly, \fBzstd\fR will refuse to read compressed data from standard input if it is a terminal\.
+\fBzstd\fR compresses or decompresses each \fIfile\fR according to the selected operation mode\. If no \fIfiles\fR are given or \fIfile\fR is \fB\-\fR, \fBzstd\fR reads from standard input and writes the processed data to standard output\. \fBzstd\fR will refuse to write compressed data to standard output if it is a terminal : it will display an error message and skip the \fIfile\fR\. Similarly, \fBzstd\fR will refuse to read compressed data from standard input if it is a terminal\.
 .
 .P
 Unless \fB\-\-stdout\fR or \fB\-o\fR is specified, \fIfiles\fR are written to a new file whose name is derived from the source \fIfile\fR name:
index d170dcc8c41f44a2a8a4cb78d8257776d2ca34fa..bb5b226644afe2ed924fb81251d1640fb141a5b9 100644 (file)
@@ -7,8 +7,10 @@ SYNOPSIS
 `zstd` [*OPTIONS*] [-|&lt;INPUT-FILE&gt;] [-o &lt;OUTPUT-FILE&gt;]
 
 `unzstd` is equivalent to `zstd -d`
+
 `zstdcat` is equivalent to `zstd -dcf`
 
+
 DESCRIPTION
 -----------
 `zstd` is a fast lossless compression algorithm and data compression tool,
@@ -27,15 +29,19 @@ but features the following differences :
   - When compressing a single file, `zstd` displays progress notifications
     and result summary by default.
     Use `-q` to turn them off.
+  - `zstd` does not accept input from console,
+    but it properly accepts `stdin` when it's not the console.
+  - `zstd` displays a short help page when command line is an error.
+    Use `-q` to turn it off.
 
 `zstd` compresses or decompresses each _file_ according to the selected
 operation mode.
 If no _files_ are given or _file_ is `-`, `zstd` reads from standard input
 and writes the processed data to standard output.
-`zstd` will refuse to (display an error and skip the _file_) to write
-compressed data to standard output if it is a terminal.
-Similarly, `zstd` will refuse to read compressed data from standard input if it
-is a terminal.
+`zstd` will refuse to write compressed data to standard output
+if it is a terminal : it will display an error message and skip the _file_.
+Similarly, `zstd` will refuse to read compressed data from standard input
+if it is a terminal.
 
 Unless `--stdout` or `-o` is specified, _files_ are written to a new file
 whose name is derived from the source _file_ name:
@@ -162,8 +168,8 @@ Typical gains range from 10% (at 64KB) to x5 better (at <1KB).
     compressed frame header, and an ID < 65536 will only need 2 bytes.
     This compares favorably to 4 bytes default.
     However, it's up to the dictionary manager to not assign twice the same ID to
-    2 different dictionaries. 
-* `-s#`: 
+    2 different dictionaries.
+* `-s#`:
     dictionary selectivity level (default: 9)
     the smaller the value, the denser the dictionary,
     improving its efficiency but reducing its possible maximum size.
@@ -194,7 +200,7 @@ Typical gains range from 10% (at 64KB) to x5 better (at <1KB).
     Once it completes, use the value of _d_ it selects with a higher _steps_
     (in the range [256, 1024]).
 
-    `zstd --train --optimize-cover FILEs` <br /> 
+    `zstd --train --optimize-cover FILEs` <br />
     `zstd --train --optimize-cover=d=d,steps=512 FILEs`
 
 
@@ -226,7 +232,7 @@ The list of available _options_:
 - `strategy`=_strat_, `strat`=_strat_:
     Specify a strategy used by a match finder.
 
-    There are 8 strategies numbered from 0 to 7, from faster to stronger: 
+    There are 8 strategies numbered from 0 to 7, from faster to stronger:
     0=ZSTD\_fast, 1=ZSTD\_dfast, 2=ZSTD\_greedy, 3=ZSTD\_lazy,
     4=ZSTD\_lazy2, 5=ZSTD\_btlazy2, 6=ZSTD\_btopt, 7=ZSTD\_btopt2.
 
index ae49da7b1e72d793d65c886406b6a36c452019c2..50ff21d53079df0fa1b79921e7d9836665db91c9 100644 (file)
@@ -167,7 +167,7 @@ static int usage_advanced(const char* programName)
 static int badusage(const char* programName)
 {
     DISPLAYLEVEL(1, "Incorrect parameters\n");
-    if (displayLevel >= 1) usage(programName);
+    if (displayLevel >= 2) usage(programName);
     return 1;
 }