[OLPC-devel] Compression
Mitch Bradley
wmb at firmworks.com
Mon Aug 7 14:03:38 EDT 2006
I have code for the gzip "inflate" algorithm (as used in gzip and pkzip)
that is suitable for embedded use.
I started with Mark Adler's (not-copyrighted) code from INFO-Zip and
modified it to run in an embedded environment. It decompresses from a
memory array to RAM with no external dependencies, and it accesses all
of its working data relative to a base address pointer, so it is
position-independent. That makes it possible to use the same compiled
image in many different circumstances. It can be used directly from ROM
in order to decompress other parts of the ROM, or copied to RAM for
faster execution, without having to worry about relocation dances.
FirmWorks has used this code for many years on many different
processors, so it is known to work well.
The size (on x86) is:
wmb at bdco:~/obp/tools$ cc -c -O inflate.c
wmb at bdco:~/obp/tools$ size inflate.o
text data bss dec hex filename
5435 0 0 5435 153b inflate.o
More information about the Devel
mailing list