This demo show how to use the LZMA encoder/decoder library
of xz util (formerly known as lzma utils).
Sorry, there is no makefile, but it is very simple to
compile the demo. Make sure you have the xz utils
library install and your compiler find the include
files (lzma.h) and the libraries (liblzma.*). Then
gcc lzmapack.c -o lzmapack -llzma
gcc lzmaunpack.c -o lzmaunpack -llzma
The demo is very simple. lzmapack read data
from stdin and compress the data with the LZMA
library (compression level 9) and write the compressed
data to stdout. lzmaunpack read data from
stdin and decompress the data with the LZMA library
and write the decompressed data to stdout. A simple
test for this demo is:
cat file1|./lzmapack|tee file2|./lzmaunpack > file3
'file1' and 'file3' should be identical, while file2
is the compressed data.
Demo is currently under GPL version 2.
* initial public release
Back to top