On Wed, Jun 2, 2010 at 3:58 PM, Steffen Mueller <[email protected]> wrote: > b) Just compressing libperl roughly halves the size of the resulting Hello > World executable.
Yes, I did some experiments, too :) > We could save even more if we had to include another library (cf. the recent > bug report). Though libgcc_s is pretty small (e.g. 87 KB on x86_64). > I guess the only difficult part that remains to be done is to modify the > WRITE_* macros that are generated by file2c so that they take into account > the compression. This seems difficult only because of the obscure "chunk" > logic. Actually no. The "chunk" stuff is very easily adapted when using zlib's inflateBack() interface. I just took the gun.c example from zlib's tarball and tweaked file2c.pl a little and bingo: I can decompress from file2c.pl generated "chunks" to an open file descriptor with very little code. I could easily shave off some more lines of code if I somehow omit the gzip header information from the chunks. (I created the chunks simply by reading from "gzip -c input-file") Also we can steal the howto-build-zlib-from-source from the Compress::Raw::Zlib distribution. But first things first: I'll unbreak PAR::Packer for Strawberry 5.12 by adding another load_me item for libgcc_s. Cheers, Roderich
