summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-28 11:43:01 (GMT)
committerYann Collet <cyan@fb.com>2016-11-28 11:43:01 (GMT)
commit6b90cfbeab05fb2a74b613352a038330b83da61a (patch)
treedfb59081dfd56ff75cfe06a98e7de34c8ef8c422
parent009f06e01d424861048727ab5d9486f7a60a3a6e (diff)
downloadlz4-6b90cfbeab05fb2a74b613352a038330b83da61a.zip
lz4-6b90cfbeab05fb2a74b613352a038330b83da61a.tar.gz
lz4-6b90cfbeab05fb2a74b613352a038330b83da61a.tar.bz2
Updated man page
-rw-r--r--programs/lz4.142
-rw-r--r--programs/lz4.1.md68
2 files changed, 71 insertions, 39 deletions
diff --git a/programs/lz4.1 b/programs/lz4.1
index d73a7ed..48c988a 100644
--- a/programs/lz4.1
+++ b/programs/lz4.1
@@ -26,24 +26,38 @@ When writing scripts that need to decompress files, it is recommended to always
\fBlz4\fR preserves original files
.
.IP "\(bu" 4
-\fBlz4\fR compresses a single file by default (use \fB\-m\fR for multiple files)
+\fBlz4\fR compresses a single file by default (see \fB\-m\fR for multiple files)
.
.IP "\(bu" 4
\fBlz4 file1 file2\fR means : compress file1 \fIinto\fR file2
.
.IP "\(bu" 4
-When no destination name is provided, compressed file name receives a \fB\.lz4\fR suffix
+\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silent them)
.
.IP "\(bu" 4
-When no destination name is provided, if \fBstdout\fR is \fInot\fR the console, it becomes the output (like a silent \fB\-c\fR)\. Therefore \fBlz4 file > /dev/null\fR will not create \fBfile\.lz4\fR
+If no destination name is provided, result is sent to \fBstdout\fR \fIexcept if stdout is the console\fR\.
.
.IP "\(bu" 4
-\fBlz4 file\fR shows real\-time statistics during compression (use \fB\-q\fR to silent them)
+If no destination name is provided, \fBand\fR if \fBstdout\fR is the console, \fBfile\fR is compressed into \fBfile\.lz4\fR\.
+.
+.IP "\(bu" 4
+As a consequence of previous rules, note the following example : \fBlz4 file | consumer\fR sends compressed data to \fBconsumer\fR through \fBstdout\fR, hence it does \fInot\fR create any \fBfile\.lz4\fR\.
.
.IP "" 0
.
.P
-Default behaviors can be modified by opt\-in commands, described below\. \fBlz4 \-m\fR more closely follows \fBgzip\fR command line syntax, supporting compression of multiple files into \fB\.lz4\fR, the last remaining difference being that source files are preserved by default\. Since it\'s also possible to erase source file using opt\-in command \fB\-\-rm\fR, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\.
+Default behaviors can be modified by opt\-in commands, detailed below\.
+.
+.IP "\(bu" 4
+\fBlz4 \-m\fR makes it possible to provide multiple input filenames, which will be compressed into files using suffix \fB\.lz4\fR\. Progress notifications are also disabled by default\. This mode has a behavior which more closely mimics \fBgzip\fR command line, with the main difference being that source files are preserved by default\.
+.
+.IP "\(bu" 4
+It\'s possible to opt\-in to erase source files on successful compression or decompression, using \fB\-\-rm\fR command\.
+.
+.IP "\(bu" 4
+Consequently, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\.
+.
+.IP "" 0
.
.SS "Concatenation of \.lz4 files"
It is possible to concatenate \fB\.lz4\fR files as is\. \fBlz4\fR will decompress such files as if they were a single \fB\.lz4\fR file\. For example: lz4 file1 > foo\.lz4 lz4 file2 >> foo\.lz4
@@ -102,7 +116,11 @@ Force write to standard output, even if it is the console\.
.
.TP
\fB\-m\fR \fB\-\-multiple\fR
-Multiple file names\. By default, the second filename is used as the destination filename for the compressed file\. With \fB\-m\fR, it is possible to specify any number of input filenames\. Each of them will be compressed independently, and the resulting name of each compressed file will be \fBfilename\.lz4\fR\. This mode also reduces notification level\.
+Multiple input files\. Compressed file names will be appended a \fB\.lz4\fR suffix\. This mode also reduces notification level\. \fBlz4 \-m\fR has a behavior equivalent to \fBgzip \-k\fR (it preserves source files by default)\.
+.
+.TP
+\fB\-r\fR
+operate recursively on directories\. This mode also sets \fB\-m\fR (multiple input files)\.
.
.TP
\fB\-B#\fR
@@ -113,7 +131,7 @@ Block size [4\-7](default : 7)
.
.TP
\fB\-BD\fR
-Block dependency (improves compression ratio on small blocks)
+Block Dependency (improves compression ratio on small blocks)
.
.TP
\fB\-\-[no\-]frame\-crc\fR
@@ -132,10 +150,10 @@ Sparse mode support (default:enabled on file, disabled on stdout)
.
.TP
\fB\-l\fR
-Use Legacy format (typically used for Linux Kernel compression)
+Use Legacy format (typically for Linux Kernel compression)
.
.br
-Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR)
+Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR) nor \fB\-r\fR
.
.SS "Other options"
.
@@ -157,7 +175,11 @@ Display Version number and exit
.
.TP
\fB\-k\fR \fB\-\-keep\fR
-Don\'t delete source file\. This is default behavior anyway, so this option is just for compatibility with \fBgzip(1)\fR / \fBxz(1)\fR\.
+Preserve source files (default behavior)
+.
+.TP
+\fB\-\-rm\fR
+Delete source files on successful compression or decompression
.
.SS "Benchmark mode"
.
diff --git a/programs/lz4.1.md b/programs/lz4.1.md
index f10680d..71ad326 100644
--- a/programs/lz4.1.md
+++ b/programs/lz4.1.md
@@ -32,22 +32,29 @@ The native file format is the `.lz4` format.
Differences are :
* `lz4` preserves original files
- * `lz4` compresses a single file by default (use `-m` for multiple files)
+ * `lz4` compresses a single file by default (see `-m` for multiple files)
* `lz4 file1 file2` means : compress file1 _into_ file2
- * When no destination name is provided, compressed file name receives
- a `.lz4` suffix
- * When no destination name is provided, if `stdout` is _not_ the console,
- it becomes the output (like a silent `-c`).
- Therefore `lz4 file > /dev/null` will not create `file.lz4`
- * `lz4 file` shows real-time statistics during compression
- (use `-q` to silent them)
-
-Default behaviors can be modified by opt-in commands, described below.
-`lz4 -m` more closely follows `gzip` command line syntax,
-supporting compression of multiple files into `.lz4`,
-the last remaining difference being that source files are preserved by default.
-Since it's also possible to erase source file using opt-in command `--rm`,
-`lz4 -m --rm` behaves the same as `gzip`.
+ * `lz4` shows real-time notification statistics
+ during compression or decompression of a single file
+ (use `-q` to silent them)
+ * If no destination name is provided, result is sent to `stdout`
+ _except if stdout is the console_.
+ * If no destination name is provided, __and__ if `stdout` is the console,
+ `file` is compressed into `file.lz4`.
+ * As a consequence of previous rules, note the following example :
+ `lz4 file | consumer` sends compressed data to `consumer` through `stdout`,
+ hence it does _not_ create any `file.lz4`.
+
+Default behaviors can be modified by opt-in commands, detailed below.
+
+ * `lz4 -m` makes it possible to provide multiple input filenames,
+ which will be compressed into files using suffix `.lz4`.
+ Progress notifications are also disabled by default.
+ This mode has a behavior which more closely mimics `gzip` command line,
+ with the main difference being that source files are preserved by default.
+ * It's possible to opt-in to erase source files
+ on successful compression or decompression, using `--rm` command.
+ * Consequently, `lz4 -m --rm` behaves the same as `gzip`.
### Concatenation of .lz4 files
@@ -131,20 +138,22 @@ only the latest one will be applied.
Force write to standard output, even if it is the console.
* `-m` `--multiple`:
- Multiple file names.
- By default, the second filename is used as the destination filename
- for the compressed file.
- With `-m`, it is possible to specify any number of input filenames.
- Each of them will be compressed independently, and the resulting name of
- each compressed file will be `filename.lz4`.
+ Multiple input files.
+ Compressed file names will be appended a `.lz4` suffix.
This mode also reduces notification level.
+ `lz4 -m` has a behavior equivalent to `gzip -k`
+ (it preserves source files by default).
+
+* `-r` :
+ operate recursively on directories.
+ This mode also sets `-m` (multiple input files).
* `-B#`:
Block size \[4-7\](default : 7)<br/>
`-B4`= 64KB ; `-B5`= 256KB ; `-B6`= 1MB ; `-B7`= 4MB
* `-BD`:
- Block dependency (improves compression ratio on small blocks)
+ Block Dependency (improves compression ratio on small blocks)
* `--[no-]frame-crc`:
Select frame checksum (default:enabled)
@@ -159,8 +168,8 @@ only the latest one will be applied.
Sparse mode support (default:enabled on file, disabled on stdout)
* `-l`:
- Use Legacy format (typically used for Linux Kernel compression)<br/>
- Note : `-l` is not compatible with `-m` (`--multiple`)
+ Use Legacy format (typically for Linux Kernel compression)<br/>
+ Note : `-l` is not compatible with `-m` (`--multiple`) nor `-r`
### Other options
@@ -168,8 +177,8 @@ only the latest one will be applied.
Verbose mode
* `-q` `--quiet`:
- Suppress warnings and real-time statistics; specify twice to suppress
- errors too
+ Suppress warnings and real-time statistics;
+ specify twice to suppress errors too
* `-h` `-H` `--help`:
Display help/long help and exit
@@ -178,9 +187,10 @@ only the latest one will be applied.
Display Version number and exit
* `-k` `--keep`:
- Don't delete source file.
- This is default behavior anyway, so this option is just for compatibility
- with `gzip(1)` / `xz(1)`.
+ Preserve source files (default behavior)
+
+* `--rm` :
+ Delete source files on successful compression or decompression
### Benchmark mode