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