DSL Tips and Tricks :: Recursive-strip C comments
My experience with zip compressions (on Windows) has been that they are incredibly good with ascii text files. I'll pull together some numbers when I get the chance, but we're talking high magnitudes. Of course, compression on binaries is almost innefctive because the binaries don't have many repeated patterns in them and so they cannot be replaced by shorter placeholders by the algorithm.
A huge ascii file with repeated patterns in it should compress very highly, and I don't think that adding comments should have a high impact on that. What is the best compression tool that can be used on Linux?
lzma.. Then there's bzip2, then gzip, then zip, then compress.
To everybody:
This method is presently unusable, because 'cpp' strips all lines that begin with directives -- for example: '#define' and '#undef'.
-- work in progress --
Hi s_i,
I could be missing something but I don't quite follow why you want to do this sort of thing to uci/unc files at all. They don't use ramdisk. In particular, running scripts to prune header files seems risky to me. You only have to inadvertently bork one character to break the header for some build.
Personally I think it's better to leave all files in these two extension types alone. I don't prune them at all, and like to be able to find the readmes etc in these extensions and often refer to them. It only means a bigger download. Leaving the files in place also can provide dependency headers and libs ready to use for compiling an upgrade, and might provide useful evidence about the source of problems with an extension.
And I'm not sure I trust stripped binaries unless the build does it for you anyway, but maybe that's not entirely rational ...? I suppose a stripped binary may have a smaller footprint once loaded into memory.
Pruning is a good idea for .dsl extensions, so you can apply all of these techniques to that extension type.
I can see there is a type of aesthetic pleasure in getting a package size down for its own sake though?
Next Page...
original here.