Suppose
you want to write a string to a compressed file and read
it back from the file.
>>> Then
you need coders and decoders!
Have
a look at the LEDA example!
Or assume
that you want to send the file to a friend via the internet
and you want to make sure that its contents did not get
corrupted.
>>> Then
you would like to add a checksum to your file!
Here
it is explained how
it works!
Suppose
further that your friend has received the encoded file
and wants to decode it. But he does not know which combination
of coders you have used for encoding.
>>> LEDA provides
a class called AutoDecoder that can deal with this.
See here,
how easy it is to use.
Of course,
you can also use the LEDA coders
in file mode. This means you can encode a file
'foo' into a file 'bar' and decode 'bar' again.
Have
a look!
Suppose,
you would like to use a sequence of coders where the data
is piped through all of them; and you would like to make
experiments using different orders of the coders.
>>> Use LEDA's coder
pipes.
Or would
you prefer to write your own coders but use them in combination
with existing ones.
>>> See how the user can build
a LEDA compliant
coder which integrates seamlessly with the AutoDecoder.
The sources
for an example are contained in the package (in: test\compression\simple_coder.c).
You would
like to simply write your LEDA objects
to or read them from compressed streams? All you need is
the compression module that provides several coders and
transformations (such as Adaptive Arithmetic Coder,
Static Arithmetic Coder, Deflation/Inflation Coder, Dictionary
based Coder, Huffman Coder, Run-Length Coder, Burrows-Wheeler-Transform,
Move-To-Front Coder) as well as different checksum
functions (CRC32, CRC-CCITT, Adler32, MD5).
More
examples in the package.
Documentation:
Read
the manual page.
|