[OLPC-devel] Compression

Ronald G Minnich rminnich at lanl.gov
Mon Aug 7 14:59:43 EDT 2006


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:
> 
> 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
> 


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



More information about the Devel mailing list