Cover V11, I04

Article
Sidebar

apr2002.tar

Compression: lzop vs. gzip or bzip2

The LZO (Lempel-Ziv-Oberhumer) algorithm provides near real-time compression for a small ratio loss versus traditional algorithms. LZO is a program, lzop, built on the lzo library. Like both gzip (GPL) and bzip2 (BSD), lzop (GPL) is open source. LZO is relatively painless to build on most major UNIX platforms.

On modern 500-MHz+ systems, LZO improves performance over uncompressed operations because the amount of data written is reduced. This is not true of most other algorithms, which require far more CPU time than can be reduced in I/O time. It is also ideal for embedded systems because decompression uses no additional memory, and compression requires a mere 64 KB (versus several MB for the others).

Typical back2cd capacities/times using different compressors (defaults used):

(none) lzop gzip bzip2

Algorithm n/a LZO LZ77 BWT

Capacity (GB) 0.7 1.0-1.5 1.1-1.8 1.2-2.0

Time** (min) 4-6 4-6 10-30 30-60

** back2cd times with gzip/bzip2 are increased further because neither have an equivalent to lzop's -o/-p options (output to another path). For gzip/bzip2/other, back2cd first uses cpio to verbatim copy to the temporary archive area and then compresses.