Wow, some script!
I'll have the time to write the whole script if the "price is right" :-)
But I can give you some pointers on getting started if you code it yourself.
I doubt any such code exists because I don't think there is a large audience for such a program!
- use openddir/readdir/etc to "crawl"
- once you open a file, use ereg to get the <? ?> stuff
- use the ereg_replace to remove comments and extraneous whitespaces
- use ereg_replace or str_replace to replace tabs
- write it to a file
- run gzip using exec() or if you have zlib compiled w/ PHP, use one of the compression functions to compress the contents and then output to the new file.
-sridhar