From 4147272b475d69a929329766aeff3297c591998d Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Mon, 28 Oct 2019 16:20:12 +0100 Subject: [PATCH] [archivers] xzize: improve doc --- archivers/README.md | 10 ++++++---- archivers/xzize.sh | 15 ++++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/archivers/README.md b/archivers/README.md index c9c041e..96f98fc 100644 --- a/archivers/README.md +++ b/archivers/README.md @@ -43,11 +43,13 @@ compressed file to XZ (with default compression level). Known compression formats are GZip (.gz), BZip2 (.bz2), LZMA (.lzma), and Lempel-Ziv (.Z). Short tar compressed suffixes are also allowed: .tgz, .tbz, -.tb2, .tlz, .taz. +.tb2, .tlz, .taz (and the output file's extension will be .txz). -In case of recompression, the original compressed file is kept. In case of -compression (i.e. when the suffix of the file does not correspond to a known -compression format), the original uncompressed file is removed. +In case of recompression, the original compressed file is kept (so you can +compare input and output file sizes and decide to keep the original or the +recompressed file). In case of compression (i.e. when the suffix of the file +does not correspond to a known compression format), the original uncompressed +file is removed. **Note**: the atool package provides the `arepack` command, which can recompress to several formats and not only to XZ. `xzize` has the advantage to diff --git a/archivers/xzize.sh b/archivers/xzize.sh index 5024ec6..fd263d6 100755 --- a/archivers/xzize.sh +++ b/archivers/xzize.sh @@ -8,13 +8,14 @@ # To Public License, Version 2, as published by Sam Hocevar. See # http://sam.zoy.org/wtfpl/COPYING for more details. # -# This script recompresses to XZ (with maximum compression level) a -# GZip (.gz, .tgz), BZip2 (.bz2, .tbz, .tb2), LZMA (.lzma, .tlz), and -# Lempel-Ziv (.Z, .taz) compressed file. The original file is keeped. -# If the file extension does not correspond to a known compression -# format, the file is compressed to XZ. In that case, the original -# file is removed. -# If the file is already XZ compressed (.xz, .txz), nothing is done. +# This script recompresses to XZ one or several GZip (.gz, .tgz), BZip2 (.bz2, +# .tbz, .tb2), LZMA (.lzma, .tlz), or Lempel-Ziv (.Z, .taz) compressed file(s). +# The original files are kept. +# +# If a file extension does not correspond to a known compression format, that +# file is compressed to XZ. In that case, the original file is removed. +# +# If the file is already XZ-compressed (.xz, .txz), nothing is done. #set -x set -u