1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Help messages
6 // Copyright (C) 2007 Lasse Collin
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 ///////////////////////////////////////////////////////////////////////////////
26 // Print this with V_WARNING instead of V_ERROR to prevent it from
27 // showing up when --quiet has been specified.
28 errmsg(V_WARNING, _("Try `%s --help' for more information."), argv0);
33 extern void lzma_attribute((noreturn))
36 printf(_("Usage: %s [OPTION]... [FILE]...\n"
37 "Compress or decompress FILEs in the .lzma format.\n"
40 puts(_("Mandatory arguments to long options are mandatory for "
41 "short options too.\n"));
46 " -z, --compress force compression\n"
47 " -d, --decompress force decompression\n"
48 " -t, --test test compressed file integrity\n"
49 " -l, --list list block sizes, total sizes, and possible metadata\n"
53 " Operation modifiers:\n"
55 " -k, --keep keep (don't delete) input files\n"
56 " -f, --force force overwrite of output file and (de)compress links\n"
57 " -c, --stdout write to standard output and don't delete input files\n"
58 " -S, --suffix=.SUF use suffix `.SUF' on compressed files instead of `.lzma'\n"
59 " -F, --format=FMT file format to encode or decode; possible values are\n"
60 " `auto' (default), `native', `alone', and `raw'\n"
61 " --files=[FILE] read filenames to process from FILE; if FILE is\n"
62 " omitted, filenames are read from the standard input;\n"
63 " filenames must be terminated with the newline character\n"
64 " --files0=[FILE] like --files but use the nul byte as terminator\n"
68 " Compression presets and basic compression options:\n"
70 " -1 .. -2 fast compression\n"
71 " -3 .. -6 good compression\n"
72 " -7 .. -9 excellent compression, but needs a lot of memory;\n"
73 " default is -7 if memory limit allows\n"
75 " -C, --check=CHECK integrity check type: `crc32', `crc64' (default),\n"
80 " Custom filter chain for compression (alternative for using presets):\n"
82 " --lzma1=[OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
83 " --lzma2=[OPTS] more of the following options (valid values; default):\n"
84 " dict=NUM dictionary size in bytes (1 - 1GiB; 8MiB)\n"
85 " lc=NUM number of literal context bits (0-4; 3)\n"
86 " lp=NUM number of literal position bits (0-4; 0)\n"
87 " pb=NUM number of position bits (0-4; 2)\n"
88 " mode=MODE compression mode (`fast' or `best'; `best')\n"
89 " nice=NUM nice length of a match (2-273; 64)\n"
90 " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
91 " depth=NUM maximum search depth; 0=automatic (default)\n"
93 " --x86 x86 filter (sometimes called BCJ filter)\n"
94 " --powerpc PowerPC (big endian) filter\n"
95 " --ia64 IA64 (Itanium) filter\n"
97 " --armthumb ARM-Thumb filter\n"
98 " --sparc SPARC filter\n"
100 " --delta=[OPTS] Delta filter; valid OPTS (valid values; default):\n"
101 " dist=NUM distance between bytes being subtracted\n"
102 " from each other (1-256; 1)\n"
104 " --subblock=[OPTS] Subblock filter; valid OPTS (valid values; default):\n"
105 " size=NUM number of bytes of data per subblock\n"
106 " (1 - 256Mi; 4Ki)\n"
107 " rle=NUM run-length encoder chunk size (0-256; 0)\n"
111 " Resource usage options:\n"
113 " -M, --memory=NUM use roughly NUM bytes of memory at maximum\n"
114 " -T, --threads=NUM use a maximum of NUM (de)compression threads\n"
115 // " --threading=STR threading style; possible values are `auto' (default),\n"
116 // " `files', and `stream'
122 " -q, --quiet suppress warnings; specify twice to suppress errors too\n"
123 " -v, --verbose be verbose; specify twice for even more verbose\n"
125 " -h, --help display this help and exit\n"
126 " -V, --version display version and license information and exit\n"));
128 puts(_("With no FILE, or when FILE is -, read standard input.\n"));
130 size_t mem_limit = opt_memory / (1024 * 1024);
134 // We use PRIu64 instead of %zu to support pre-C99 libc.
135 puts(_("On this system and configuration, the tool will use"));
136 printf(_(" * roughly %" PRIu64 " MiB of memory at maximum; and\n"),
137 (uint64_t)(mem_limit));
138 printf(N_(" * at maximum of one thread for (de)compression.\n\n",
139 " * at maximum of %" PRIu64
140 " threads for (de)compression.\n\n",
141 (uint64_t)(opt_threads)), (uint64_t)(opt_threads));
143 printf(_("Report bugs to <%s> (in English or Finnish).\n"),
150 extern void lzma_attribute((noreturn))
154 "lzma (LZMA Utils) " PACKAGE_VERSION "\n"
156 "Copyright (C) 1999-2008 Igor Pavlov\n"
157 "Copyright (C) 2007-2008 Lasse Collin\n"
159 "This program is free software; you can redistribute it and/or modify\n"
160 "it under the terms of the GNU General Public License as published by\n"
161 "the Free Software Foundation; either version 2 of the License, or\n"
162 "(at your option) any later version.\n"
164 "This program is distributed in the hope that it will be useful,\n"
165 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
166 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
167 "GNU General Public License for more details.\n"