LibLZF 1.51 review

Download
by rbytes.net on

LibLZF is a very small data compression library

License: BSD License
File size: 44K
Developer: Marc Lehmann
0 stars award from rbytes.net

LibLZF is a very small data compression library. LibLZF library consists of only two .c and two .h files and is very easy to incorporate into your own programs. The compression algorithm is very, very fast, yet still written in portable C.

Last not least, it is freely usable, unlike most other compression libraries which are under the GPL, this library uses a BSD-type license, so you can include it in your programs without worrying.

Here are some key features of "LibLZF":
Small code size (less then 500 lines including header files and docs).
Very fast compression speeds, rivaling a straight copy loop, especially for decompression which is basically at (unoptimized) memcpy-speed. Compression speed can be increased by 20% by sacrificing a few percent of compression ratio.
Mediocre compression ratios - you can usually expect about 40-50% compression for typical binary data
Easy to use (just two functions, no state attached)
Highly portable (written in C)
Tunable, see the file lzfP.h in the distribution, to tailor liblzf to your needs. The generated compressed blocks can be decompressed by any liblzf version regardless of the options used to compress.
Freely usable (BSD-type-license)
Perl-Interface is available on CPAN (Compress::LZF)

LibLZF is an ideal library for the following applications:

Fast, real-time compression, where liblzf can save I/O without costing too much CPU time.
Block compression. If you have repeated blocks of data (IP packets, application state etc..), then liblzf is ideal to decrease the size at a very small cost, as liblzf is basically free on modern cpus.

What's New in This Release:
incorporated C♯ implementation of both the en- and decoder, written by "Oren J. Maurice". You can find it in the cs/ subdirectory.
make FRST, NEXT IDX overridable if lzf_c.c is directly included in the code.

LibLZF 1.51 search tags