Home Products Technology OpenSource Company
  LZO

Version 2.06

12 Aug 2011

Copyright (C) 1996 - 2011
Markus F.X.J. Oberhumer

[News] [Abstract] [Introduction] [Speed] [Portability] [Documentation]
[Download] [miniLZO] [lzop] [Links]


News

  • LZO 2.06 has been released. This is a maintenance release which also features some optimizations. Please see the Change Log for more details.
  • New .NET & Ruby bindings as well as updated Java, Perl & Python interfaces will follow sometime in the future.
  • LZO is now accompanied by our stunning new commercial LZO Professional product - if you like LZO right now then we know that you will be interested!

Key Facts

  • LZO is a portable lossless data compression library written in ANSI C.
  • Reliable and thoroughly tested. High adoption - each second terrabytes of data are compressed by LZO. No bugs since the first release back in 1996.
  • Offers pretty fast compression and *extremely* fast decompression.
  • Implements the fastest compression and decompression algorithms around. See the ratings for lzop in the famous Archive Comparison Test .
  • Includes slower compression levels achieving a quite competitive compression ratio while still decompressing at this very high speed.
  • Distributed under the terms of the GNU General Public License (GPL v2+).
  • Military-grade stability and robustness.

Introduction

LZO is a data compression library which is suitable for data de-/compression in real-time. This means it favours speed over compression ratio.

LZO is written in ANSI C. Both the source code and the compressed data format are designed to be portable across platforms.

LZO implements a number of algorithms with the following features:

  • Decompression is simple and *very* fast.
  • Requires no memory for decompression.
  • Compression is pretty fast.
  • Requires 64 kB of memory for compression.
  • Allows you to dial up extra compression at a speed cost in the compressor. The speed of the decompressor is not reduced.
  • Includes compression levels for generating pre-compressed data which achieve a quite competitive compression ratio.
  • There is also a compression level which needs only 8 kB for compression.
  • Algorithm is thread safe.
  • Algorithm is lossless.

LZO supports overlapping compression and in-place decompression.

LZO and the LZO algorithms and implementations are distributed under the terms of the GNU General Public License (GPL) .

How fast is fast ?

Here are some original timings done on an Intel Pentium 133 back in 1997. Multiply by a constant factor for modern machines.

  • memcpy(): ~60 MB/sec
  • LZO1X decompression in C: ~16 MB/sec
  • LZO1X decompression in optimized assembler: ~20 MB/sec
  • LZO1X-1 compression: ~5 MB/sec

More detailed results can be found in the documentation.

Portability

LZO has been successfully built and tested on a variety of platforms including DOS (16 + 32 bit), Windows 3.x (16-bit), Windows 95/98/ME/NT/2000/XP/2003, Linux, HPUX and a DEC Alpha (64-bit).

LZO is also reported to work under AIX, AmigaOS, ConvexOS, CrayOS, Dreamcast, FreeBSD, IRIX, Mac Classic, MacOSX, MiNT, NetBSD, Nintendo64, OpenBSD, OS/400, PalmOS (Pilot), PlayStation, QNX, Solaris, SunOS, TOS, WinCE, VMS, VxWorks, Wii and Xbox.

And finally it would be much fun to translate the decompressors to ancient CPUs like Z-80 or 6502 assembly.

Read the

Download LZO from

miniLZO

miniLZO is a lightweight subset of the LZO library.

We've created miniLZO for projects where it is inconvenient to include or require the full LZO source code just because you want to add a little bit of data compression to your application.

miniLZO implements the LZO1X-1 compressor and both the standard and safe LZO1X decompressor. Apart from fast compression it also useful for situations where you want to use pre-compressed data files (which must have been compressed with LZO1X-999).

miniLZO consists of one C source file and three header files. It compiles to less than 5 kB (on an i386), and the sources are about 30 kB when packed - so there's no more excuse that your application doesn't support data compression :-)

Download miniLZO (45 kB).

LZOP

lzop is a file compressor which uses LZO for compression services. It is very similar to gzip - its main advantages over gzip are much higher compression and decompression speed.

Related links

  • LZO Professional is our stunning new commercial LZO product.
  • The UCL compression library focuses on generating pre-compressed data while still providing very fast decompression without additional memory requirements. UCL is a OpenSource re-implementation of some NRV compression algorithms.
  • If you need better compression you should take a look at the excellent zlib library. zlib is slower and needs more memory, though.
  • For even better compression consider using libbzip2 which is distributed with the bzip2 file compressor.
  • The FAQ of the newsgroup comp.compression is an invaluable source of information related to data compression.