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