ESC 1.14 

 ESC
Introduction
Requirements
The inner workings
Compression-levels
Variable substitution
Commandline options
Examples of usage
Caveats/Known problems
Release history
License
Download
Crunching, the inner workings
ESC heavily relies on complex regular expressions and uses a patternscheme that is only supported by JScript 5.5+'s regular expression engine. The compression-ratio is defined in levels whereas level 2 also performs actions taken at level 0 & 1. Running ESC at level 3 steps through 0,1,2 additionally, und so weiter...
 
Levels 1 thru 3 involves the common method of removing whitespace to decrease the total size of the files. In the eyes of a programmer this action will render a script completely unmanageable in the matter of readability and debugging, but to the script-interpreter a crunched script is just as fine as any other, infact in a theorethical sense I would go as far as saying scripts processed with ESC are executed faster by an interpreter since there are less characters in total for it to parse. Not really measureable, but still... :)
 
At Level 4 or by using the -$ option additionally instructs ESC to perform global variable substitution upon the guts of your scripts. Now, some would say this sounds more of an act of obfuscation. Well, that is correct in a sense, but not the intent. The degree of obfuscation achieved is merely a bi-product of this technique. The sole and major concern here is to shorten variable, member and method-names in order to shrink the total size of your script beyond what's possible with whitespace removal technique used by the preceeding levels. Be aware though that processing a script at this level will result in a lossy output, or atleast semi-lossy since it is practically impossible to restore a script crunched at this level to its original state again. Atleast, this will require a tremendous work hardly worth the trouble, so make sure always to KEEP your originals at a safe location. To my knowledge, ESC is the only tool around being able to perform variable substitution globally and locally with preserved scopes and still produce interpretable output...
 
What level to choose is up to you, but I suggest your start at the default level (2) and proceed from there. There are implications involved when crunching at 3 & 4 that you should be aware of before attempting to have a go at them. Read the the section "Crunching, level by level" to get the hang of what's being performed at each level.
 
 
 SiteSearch
 Search Site By Google