Mitch Bradley wrote:
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:
[EMAIL PROTECTED]:~/obp/tools$ cc -c -O inflate.c
[EMAIL PROTECTED]:~/obp/tools$ size inflate.o
text data bss dec hex filename
5435 0 0 5435 153b inflate.o
My full-custom iron-o-meter is pegged at 11. Reason is that if you go
back to linuxbios of 6 years ago, we used the linux gzip inflate ...
this is great stuff, thanks.
ron
_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel