Home Products OpenSource Company
  UCL

Version 1.03

20 Jul 2004

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

[News] [Abstract] [Overview] [Speed]
[Portability] [Download] [Links] [Screenshots]


News

  • 20 Jul 2004: UCL 1.03 has been released. See the files NEWS for a list of changes.

Key Facts

UCL is a portable lossless data compression library written in ANSI C.

UCL implements a number of compression algorithms that achieve an excellent compression ratio while allowing *very* fast decompression. Decompression requires no additional memory.

UCL is an OpenSource re-implementation of some NRV compression algorithms.

As compared to LZO, the UCL algorithms achieve a better compression ratio but decompression is a little bit slower. See below for some rough timings.

Overview

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

UCL implements a number of algorithms with the following features:

  • Decompression is simple and *very* fast.
  • Requires no memory for decompression.
  • The decompressors can be squeezed into less than 200 bytes of code.
  • Focuses on compression levels for generating pre-compressed data which achieve a quite competitive compression ratio.
  • Allows you to dial up extra compression at a speed cost in the compressor. The speed of the decompressor is not reduced.
  • Algorithm is thread safe.
  • Algorithm is lossless.

UCL supports in-place decompression.

UCL and the UCL algorithms and implementations are distributed under the terms of the GNU General Public License (GPL) { auf Deutsch }. Special licenses for commercial and other applications are available by contacting the author.

How fast is fast ?

Here are some original timings on an ancient Intel Pentium 133 back in the year 2000:

  • memcpy(): ~60 MB/sec
  • UCL decompression in optimized assembler: ~13 MB/sec
  • LZO decompression in optimized assembler: ~20 MB/sec
  • LZO decompression in C: ~16 MB/sec

Portability

UCL's decompressors should work on any system around - they could even get ported to 8-bit processors such as the Z-80 or 6502. (In fact I expect a 6502 implementation too happen soon in the process of extending the UPX executable packer).

The compressors currently require at least 32-bit integers. While porting them to more restricted environments (such as 16-bit DOS) should be possible without too much effort this is not considered important at this time.

Download

  • Download UCL (source code, 522 kB, SHA1: 5847003d136fbbca1334dd5de10554c76c755f7c).

Related links