Home Products Technology OpenSource Company
oberhumer.com LZO

Version 1.08

12 Jul 2002

Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
Markus F.X.J. Oberhumer

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


  • LZO 2.00 is scheduled for early 2005, including full support for LLP64 programming models (Win64), .NET bindings, and lots of other improvements.
  • LZO 2.00 will be accompanied by our stunning new LZO Professional product - if you feel that LZO has a an incredible performance right now we know that you will stay tuned...
  • LZO implements the fastest compression and decompression algorithms around. See the ratings for lzop in the famous Archive Comparison Test .
  • 29 Aug 2002: Perl-LZO 1.08 has been released (12 kB).
  • 17 Jul 2002: Python-LZO 1.08 has been released (13 kB).
  • 12 Jul 2002: LZO 1.08 has been released.
  • 01 Dec 1999: Java-LZO 1.00 has been released (36 kB).

Key Facts

  • LZO is a portable lossless data compression library written in ANSI C.
  • Offers pretty fast compression and *extremly* fast decompression. [Screenshot]
  • 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). Commercial licenses are available on request.
  • Military-grade stability and robustness.


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) . Special licenses for commercial and other applications are available by contacting the author.

How fast is fast ?

Here are some original timings done on an Intel Pentium 133. 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.


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, PalmOS (Pilot), PSX, PS2, OpenBSD, OS/400, QNX, Solaris, SunOS, TOS, WinCE, VMS, VxWorks 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 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 two header files. It compiles to less than 5 kB (on an i386), and the sources are about 14 kB when packed - so there's no more excuse that your application doesn't support data compression :-)

Download miniLZO (26 kB).


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 (scheduled for Q2 2005).
  • The NRV compression library is the flagship of our compression products, featuring unrivaled space-grade technology.
  • 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 infomation related to data compression.

Space-Grade Technology

oberhumer.com has designed and implemented the on-board lossless data compression module of the NASA Mars Exploration Rovers, better known under the names Spirit and Opportunity.