Debian Codegraph @

doc/lzop.html

raw
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title></title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:root@localhost" />
8 </head>
9
10 <body>
11
12
13
14 <h1 id="NAME">NAME</h1>
15
16 <p>lzop - compress or expand files</p>
17
18 <h1 id="ABSTRACT">ABSTRACT</h1>
19
20 <p><b>lzop</b> is a file compressor very similar to <b>gzip</b>. <b>lzop</b> favors speed over compression ratio.</p>
21
22 <h1 id="SYNOPSIS">SYNOPSIS</h1>
23
24 <p><b>lzop</b> <span style="white-space: nowrap;">[ <i>command</i> ]</span> <span style="white-space: nowrap;">[ <i>options</i> ]</span> <span style="white-space: nowrap;">[ <i>filename</i> ... ]</span></p>
25
26 <p><b>lzop</b> <span style="white-space: nowrap;">[<b>-dxlthIVL19</b>]</span> <span style="white-space: nowrap;">[<b>-qvcfFnNPkU</b>]</span> <span style="white-space: nowrap;">[<b>-o</b> <i>file</i>]</span> <span style="white-space: nowrap;">[<b>-p</b>[<i>path</i>]]</span> <span style="white-space: nowrap;">[<b>-S</b> <i>suffix</i>]</span> <span style="white-space: nowrap;">[<i>filename</i> ...]</span></p>
27
28 <h1 id="DESCRIPTION">DESCRIPTION</h1>
29
30 <p><b>lzop</b> reduces the size of the named files. Whenever possible, each file is compressed into one with the extension <b>.lzo</b>, while keeping the same ownership modes, access and modification times. If no files are specified, or if a file name is &quot;-&quot;, lzop tries to compress the standard input to the standard output. lzop will only attempt to compress regular files or symbolic links to regular files. In particular, it will ignore directories.</p>
31
32 <p>If the compressed file name is too long for its file system, <b>lzop</b> truncates it.</p>
33
34 <p>Compressed files can be restored to their original form using <span style="white-space: nowrap;"><b>lzop -d</b></span>. <span style="white-space: nowrap;"><b>lzop -d</b></span> takes a list of files on its command line and decompresses each file whose name ends with <b>.lzo</b> and which begins with the correct magic number to an uncompressed file without the original extension. <span style="white-space: nowrap;"><b>lzop -d</b></span> also recognizes the special extension <b>.tzo</b> as shorthand for <b>.tar.lzo</b>. When compressing, lzop uses the <b>.tzo</b> extension if necessary instead of truncating a file with a <b>.tar</b> extension.</p>
35
36 <p><b>lzop</b> stores the original file name, mode and time stamp in the compressed file. These can be used when decompressing the file with the <b>-d</b> option. This is useful when the compressed file name was truncated or when the time stamp was not preserved after a file transfer.</p>
37
38 <p><b>lzop</b> preserves the ownership, mode and time stamp of files when compressing. When decompressing lzop restores the mode and time stamp if present in the compressed files. See the options <b>-n</b>, <b>-N</b>, <b>--no-mode</b> and <b>--no-time</b> for more information.</p>
39
40 <p><b>lzop</b> always keeps original files unchanged unless you use the option <b>-U</b>.</p>
41
42 <p><b>lzop</b> uses the <i>LZO data compression library</i> for compression services. The amount of compression obtained depends on the size of the input and the distribution of common substrings. Typically, text such as source code or English is compressed into 40-50% of the original size, and large files usually compress much better than small ones. Compression and decompression speed is generally much faster than that achieved by <b>gzip</b>, but compression ratio is worse.</p>
43
44 <h2 id="COMPRESSION-LEVELS">COMPRESSION LEVELS</h2>
45
46 <p>lzop offers the following compression levels of the LZO1X algorithm:</p>
47
48 <dl>
49
50 <dt id="pod-3">-3</dt>
51 <dd>
52
53 <p>the default level offers pretty fast compression. -2, -3, -4, -5 and -6 are currently all equivalent - this may change in a future release.</p>
54
55 </dd>
56 <dt id="fast">-1, --fast</dt>
57 <dd>
58
59 <p>can be even a little bit faster in some cases - but most times you won&#39;t notice the difference</p>
60
61 </dd>
62 <dt id="best">-7, -8, -9, --best</dt>
63 <dd>
64
65 <p>these compression levels are mainly intended for generating pre-compressed data - especially <b>-9</b> can be somewhat slow</p>
66
67 </dd>
68 </dl>
69
70 <p>Decompression is <i>very</i> fast for all compression levels, and decompression speed is not affected by the compression level.</p>
71
72 <h1 id="MAIN-COMMAND">MAIN COMMAND</h1>
73
74 <p>If no other command is given then lzop defaults to compression (using compression level -3).</p>
75
76 <dl>
77
78 <dt id="fast---best">-#, --fast, --best</dt>
79 <dd>
80
81 <p>Regulate the speed of compression using the specified digit <b>#</b>, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method (best compression). The default compression level is -3.</p>
82
83 </dd>
84 <dt id="d---decompress---uncompress">-d, --decompress, --uncompress</dt>
85 <dd>
86
87 <p>Decompress. Each file will be placed into same the directory as the compressed file.</p>
88
89 </dd>
90 <dt id="x---extract">-x, --extract</dt>
91 <dd>
92
93 <p>Extract compressed files to the current working directory. This is the same as &#39;-dPp&#39;.</p>
94
95 </dd>
96 <dt id="t---test">-t, --test</dt>
97 <dd>
98
99 <p>Test. Check the compressed file integrity.</p>
100
101 </dd>
102 <dt id="l---list">-l, --list</dt>
103 <dd>
104
105 <p>For each compressed file, list the following fields:</p>
106
107 <pre><code> method: compression method
108 compressed: size of the compressed file
109 uncompr.: size of the uncompressed file
110 ratio: compression ratio
111 uncompressed_name: name of the uncompressed file</code></pre>
112
113 <p>In combination with the --verbose option, the following fields are also displayed:</p>
114
115 <pre><code> date &amp; time: time stamp for the uncompressed file</code></pre>
116
117 <p>With --name, the uncompressed name, date and time are those stored within the compress file if present.</p>
118
119 <p>With --verbose, the size totals and compression ratio for all files is also displayed. With --quiet, the title and totals lines are not displayed.</p>
120
121 <p>Note that lzop defines compression ratio as compressed_size / uncompressed_size.</p>
122
123 </dd>
124 <dt id="ls---ls-FLAGS">--ls, --ls=<i>FLAGS</i></dt>
125 <dd>
126
127 <p>List each compressed file in a format similar to <span style="white-space: nowrap;"><b>ls -ln</b></span>.</p>
128
129 <p>The following flags are currently honoured: F Append a &#39;*&#39; for executable files. G Inhibit display of group information. Q Enclose file names in double quotes.</p>
130
131 </dd>
132 <dt id="info">--info</dt>
133 <dd>
134
135 <p>For each compressed file, list the internal header fields.</p>
136
137 </dd>
138 <dt id="I---sysinfo">-I, --sysinfo</dt>
139 <dd>
140
141 <p>Display information about the system and quit.</p>
142
143 </dd>
144 <dt id="L---license">-L, --license</dt>
145 <dd>
146
147 <p>Display the lzop license and quit.</p>
148
149 </dd>
150 <dt id="h--H---help">-h, -H, --help</dt>
151 <dd>
152
153 <p>Display a help screen and quit.</p>
154
155 </dd>
156 <dt id="V">-V</dt>
157 <dd>
158
159 <p>Version. Display the version number and compilation options and quit.</p>
160
161 </dd>
162 <dt id="version">--version</dt>
163 <dd>
164
165 <p>Version. Display the version number and quit.</p>
166
167 </dd>
168 </dl>
169
170 <h1 id="OPTIONS">OPTIONS</h1>
171
172 <dl>
173
174 <dt id="c---stdout---to-stdout">-c, --stdout, --to-stdout</dt>
175 <dd>
176
177 <p>Write output on standard output. If there are several input files, the output consists of a sequence of independently (de)compressed members. To obtain better compression, concatenate all input files before compressing them.</p>
178
179 </dd>
180 <dt id="o-FILE---output-FILE">-o <i>FILE</i>, --output=<i>FILE</i></dt>
181 <dd>
182
183 <p>Write output to the file <i>FILE</i>. If there are several input files, the output consists of a sequence of independently (de)compressed members.</p>
184
185 </dd>
186 <dt id="p--pDIR---path-DIR">-p, -p<i>DIR</i>, --path=<i>DIR</i></dt>
187 <dd>
188
189 <p>Write output files into the directory <i>DIR</i> instead of the directory determined by the input file. If <i>DIR</i> is omitted, then write to the current working directory.</p>
190
191 </dd>
192 <dt id="f---force">-f, --force</dt>
193 <dd>
194
195 <p>Force lzop to</p>
196
197 <pre><code> - overwrite existing files
198 - (de-)compress from stdin even if it seems a terminal
199 - (de-)compress to stdout even if it seems a terminal
200 - allow option -c in combination with -U</code></pre>
201
202 <p>Using <b>-f</b> two or more times forces things like</p>
203
204 <pre><code> - compress files that already have a .lzo suffix
205 - try to decompress files that do not have a valid suffix
206 - try to handle compressed files with unknown header flags</code></pre>
207
208 <p>Use with care.</p>
209
210 </dd>
211 <dt id="F---no-checksum">-F, --no-checksum</dt>
212 <dd>
213
214 <p>Do not store or verify a checksum of the uncompressed file when compressing or decompressing. This speeds up the operation of lzop a little bit (especially when decompressing), but as unnoticed data corruption can happen in case of damaged compressed files the usage of this option is not generally recommended. Also, a checksum is always stored when compressing with one of the slow compression levels (-7, -8 or -9), regardless of this option.</p>
215
216 </dd>
217 <dt id="n---no-name">-n, --no-name</dt>
218 <dd>
219
220 <p>When decompressing, do not restore the original file name if present (remove only the lzop suffix from the compressed file name). This option is the default under UNIX.</p>
221
222 </dd>
223 <dt id="N---name">-N, --name</dt>
224 <dd>
225
226 <p>When decompressing, restore the original file name if present. This option is useful on systems which have a limit on file name length. If the original name saved in the compressed file is not suitable for its file system, a new name is constructed from the original one to make it legal. This option is the default under DOS, Windows and OS/2.</p>
227
228 </dd>
229 <dt id="P">-P</dt>
230 <dd>
231
232 <p>When decompressing, restore the original path and file name if present. When compressing, store the relative (and cleaned) path name. This option is mainly useful when using <b>archive mode</b> - see usage examples below.</p>
233
234 </dd>
235 <dt id="no-mode">--no-mode</dt>
236 <dd>
237
238 <p>When decompressing, do not restore the original mode (permissions) saved in the compressed file.</p>
239
240 </dd>
241 <dt id="no-time">--no-time</dt>
242 <dd>
243
244 <p>When decompressing, do not restore the original time stamp saved in the compressed file.</p>
245
246 </dd>
247 <dt id="S-.suf---suffix-.suf">-S <i>.suf</i>, --suffix=<i>.suf</i></dt>
248 <dd>
249
250 <p>Use suffix <i>.suf</i> instead of <i>.lzo</i>. The suffix must not contain multiple dots and special characters like &#39;+&#39; or &#39;*&#39;, and suffixes other than <i>.lzo</i> should be avoided to avoid confusion when files are transferred to other systems.</p>
251
252 </dd>
253 <dt id="k---keep">-k, --keep</dt>
254 <dd>
255
256 <p>Do not delete input files. This is the default.</p>
257
258 </dd>
259 <dt id="U---unlink---delete">-U, --unlink, --delete</dt>
260 <dd>
261
262 <p>Delete input files after successful compression or decompression. Use this option to make lzop behave like <b>gzip</b> and <b>bzip2</b>. Note that explicitly giving <b>-k</b> overrides <b>-U</b>.</p>
263
264 </dd>
265 <dt id="crc32">--crc32</dt>
266 <dd>
267
268 <p>Use a crc32 checksum instead of an adler32 checksum.</p>
269
270 </dd>
271 <dt id="no-warn">--no-warn</dt>
272 <dd>
273
274 <p>Suppress all warnings.</p>
275
276 </dd>
277 <dt id="ignore-warn">--ignore-warn</dt>
278 <dd>
279
280 <p>Suppress all warnings, and never exit with exit status 2.</p>
281
282 </dd>
283 <dt id="q---quiet---silent">-q, --quiet, --silent</dt>
284 <dd>
285
286 <p>Suppress all warnings and decrease the verbosity of some commands like <b>--list</b> or <b>--test</b>.</p>
287
288 </dd>
289 <dt id="v---verbose">-v, --verbose</dt>
290 <dd>
291
292 <p>Verbose. Display the name for each file compressed or decompressed. Multiple <b>-v</b> can be used to increase the verbosity of some commands like <b>--list</b> or <b>--test</b>.</p>
293
294 </dd>
295 <dt id="pod">--</dt>
296 <dd>
297
298 <p>Specifies that this is the end of the options. Any file name after <b>--</b> will not be interpreted as an option even if it starts with a hyphen.</p>
299
300 </dd>
301 </dl>
302
303 <h1 id="OTHER-OPTIONS">OTHER OPTIONS</h1>
304
305 <dl>
306
307 <dt id="no-stdin">--no-stdin</dt>
308 <dd>
309
310 <p>Do not try to read standard input (but a file name &quot;-&quot; will still override this option). In old versions of <b>lzop</b>, this option was necessary when used in cron jobs (which do not have a controlling terminal).</p>
311
312 </dd>
313 <dt id="filter-NUMBER">--filter=<i>NUMBER</i></dt>
314 <dd>
315
316 <p>Rarely useful. Preprocess data with a special &quot;multimedia&quot; filter before compressing in order to improve compression ratio. <i>NUMBER</i> must be a decimal number from 1 to 16, inclusive. Using a filter slows down both compression and decompression quite a bit, and the compression ratio usually doesn&#39;t improve much either... More effective filters may be added in the future, though.</p>
317
318 <p>You can try <span style="white-space: nowrap;">--filter=1</span> with data like 8-bit sound samples, <span style="white-space: nowrap;">--filter=2</span> with 16-bit samples or depth-16 images, etc.</p>
319
320 <p>Un-filtering during decompression is handled automatically.</p>
321
322 </dd>
323 <dt id="C---checksum">-C, --checksum</dt>
324 <dd>
325
326 <p>Deprecated. Only for compatibility with very old versions as lzop now uses a checksum by default. This option will get removed in a future release.</p>
327
328 </dd>
329 <dt id="no-color">--no-color</dt>
330 <dd>
331
332 <p>Do not use any color escape sequences.</p>
333
334 </dd>
335 <dt id="mono">--mono</dt>
336 <dd>
337
338 <p>Assume a mono ANSI terminal. This is the default under UNIX (if console support is compiled in).</p>
339
340 </dd>
341 <dt id="color">--color</dt>
342 <dd>
343
344 <p>Assume a color ANSI terminal or try full-screen access. This is the default under DOS and in a Linux virtual console (if console support is compiled in).</p>
345
346 </dd>
347 </dl>
348
349 <h1 id="ADVANCED-USAGE">ADVANCED USAGE</h1>
350
351 <p>lzop allows you to deal with your files in many flexible ways. Here are some usage examples:</p>
352
353 <dl>
354
355 <dt id="backup-mode"><b>backup mode</b></dt>
356 <dd>
357
358 <pre><code> tar --use-compress-program=lzop -cf archive.tar.lzo files..
359
360 This is the recommended mode for creating backups.
361 Requires GNU tar or a compatible version which accepts the
362 &#39;--use-compress-program=XXX&#39; option.</code></pre>
363
364 </dd>
365 <dt id="single-file-mode:-individually-de-compress-each-file"><b>single file mode:</b> individually (de)compress each file</dt>
366 <dd>
367
368 <pre><code> create
369 lzop a.c -&gt; create a.c.lzo
370 lzop a.c b.c -&gt; create a.c.lzo &amp; b.c.lzo
371 lzop -U a.c b.c -&gt; create a.c.lzo &amp; b.c.lzo and delete a.c &amp; b.c
372 lzop *.c
373
374 extract
375 lzop -d a.c.lzo -&gt; restore a.c
376 lzop -df a.c.lzo -&gt; restore a.c, overwrite if already exists
377 lzop -d *.lzo
378
379 list
380 lzop -l a.c.lzo
381 lzop -l *.lzo
382 lzop -lv *.lzo -&gt; be verbose
383
384 test
385 lzop -t a.c.lzo
386 lzop -tq *.lzo -&gt; be quiet</code></pre>
387
388 </dd>
389 <dt id="pipe-mode:-de-compress-from-stdin-to-stdout"><b>pipe mode:</b> (de)compress from stdin to stdout</dt>
390 <dd>
391
392 <pre><code> create
393 lzop &lt; a.c &gt; y.lzo
394 cat a.c | lzop &gt; y.lzo
395 tar -cf - *.c | lzop &gt; y.tar.lzo -&gt; create a compressed tar file
396
397 extract
398 lzop -d &lt; y.lzo &gt; a.c
399 lzop -d &lt; y.tar.lzo | tar -xvf - -&gt; extract a tar file
400
401 list
402 lzop -l &lt; y.lzo
403 cat y.lzo | lzop -l
404 lzop -d &lt; y.tar.lzo | tar -tvf - -&gt; list a tar file
405
406 test
407 lzop -t &lt; y.lzo
408 cat y.lzo | lzop -t</code></pre>
409
410 </dd>
411 <dt id="stdout-mode:-de-compress-to-stdout"><b>stdout mode:</b> (de)compress to stdout</dt>
412 <dd>
413
414 <pre><code> create
415 lzop -c a.c &gt; y.lzo
416
417 extract
418 lzop -dc y.lzo &gt; a.c
419 lzop -dc y.tar.lzo | tar -xvf - -&gt; extract a tar file
420
421 list
422 lzop -dc y.tar.lzo | tar -tvf - -&gt; list a tar file</code></pre>
423
424 </dd>
425 <dt id="archive-mode:-compress-extract-multiple-files-into-a-single-archive-file"><b>archive mode:</b> compress/extract multiple files into a single archive file</dt>
426 <dd>
427
428 <pre><code> create
429 lzop a.c b.c -o sources.lzo -&gt; create an archive
430 lzop -P src/*.c -o sources.lzo -&gt; create an archive, store path name
431 lzop -c *.c &gt; sources.lzo -&gt; another way to create an archive
432 lzop -c *.h &gt;&gt; sources.lzo -&gt; add files to archive
433
434 extract
435 lzop -dN sources.lzo
436 lzop -x ../src/sources.lzo -&gt; extract to current directory
437 lzop -x -p/tmp &lt; ../src/sources.lzo -&gt; extract to /tmp directory
438
439 list
440 lzop -lNv sources.lzo
441
442 test
443 lzop -t sources.lzo
444 lzop -tvv sources.lzo -&gt; be very verbose</code></pre>
445
446 </dd>
447 </dl>
448
449 <p>If you wish to create a single archive file with multiple members so that members can later be extracted independently, you should prefer a full-featured archiver such as tar. The latest version of GNU tar supports the <span style="white-space: nowrap;"><b>--use-compress-program=lzop</b></span> option to invoke lzop transparently. lzop is designed as a complement to tar, not as a replacement.</p>
450
451 <h1 id="ENVIRONMENT">ENVIRONMENT</h1>
452
453 <p>The environment variable <b>LZOP</b> can hold a set of default options for lzop. These options are interpreted first and can be overwritten by explicit command line parameters. For example:</p>
454
455 <pre><code> for sh/ksh/zsh: LZOP=&quot;-1v --name&quot;; export LZOP
456 for csh/tcsh: setenv LZOP &quot;-1v --name&quot;
457 for DOS/Windows: set LZOP=-1v --name</code></pre>
458
459 <p>On Vax/VMS, the name of the environment variable is LZOP_OPT, to avoid a conflict with the symbol set for invocation of the program.</p>
460
461 <p>Not all of the options are valid in the environment variable - lzop will tell you.</p>
462
463 <h1 id="SEE-ALSO">SEE ALSO</h1>
464
465 <p><b>bzip2</b>(1), <b>gzip</b>(1), <b>tar</b>(1), <b>xz</b>(1)</p>
466
467 <p>Precompiled binaries for some platforms are available from the lzop home page.</p>
468
469 <pre><code> see http://www.oberhumer.com/opensource/lzop/</code></pre>
470
471 <p>lzop uses the LZO data compression library for compression services.</p>
472
473 <pre><code> see http://www.oberhumer.com/opensource/lzo/</code></pre>
474
475 <h1 id="DIAGNOSTICS">DIAGNOSTICS</h1>
476
477 <p>Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2 (unless option <b>--ignore-warn</b> is in effect).</p>
478
479 <p><b>lzop&#39;s</b> diagnostics are intended to be self-explanatory.</p>
480
481 <h1 id="BUGS">BUGS</h1>
482
483 <p>No bugs are known. Please report all problems immediately to the author.</p>
484
485 <h1 id="AUTHOR">AUTHOR</h1>
486
487 <p>Markus Franz Xaver Johannes Oberhumer &lt;[email protected]&gt; http://www.oberhumer.com/opensource/lzop/</p>
488
489 <h1 id="COPYRIGHT">COPYRIGHT</h1>
490
491 <p>lzop and the LZO library are Copyright (C) 1996-2017 Markus Franz Xaver Oberhumer &lt;[email protected]&gt;. All Rights Reserved.</p>
492
493 <p>lzop and the LZO library are distributed under the terms of the GNU General Public License (GPL).</p>
494
495 <p>Legal info: If want to integrate lzop into your commercial (backup-)system please carefully read the GNU GPL FAQ at http://www.gnu.org/licenses/gpl-faq.html about possible implications.</p>
496
497
498 </body>
499
500 </html>
501
502