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