Before compressing, make sure your code doesn't use either ~ or `. Copy and paste your code into the textarea below and press the "Compress" button. The compression process will take a while (about 1 minute per 1k). You can watch it's progress in your browser's status bar. The resulting, compressed file is a self-extracting archive that, when viewed in a browser, will uncompress and run itself. The compression mechanism looks for repeated strings and substitutes tokens for those strings. You can set a maximum string replacement length - lower values will speed compression but may not optimally compress your file. Because the self-extraction code is added to the compressed code, some pre-optimized, sub-1k files will grow in size when run through the compressor.
If the compressed code is greater than 5k, you'll have to return to step 2
, drop some functionality and repeat the compression steps.
Though the self-extraction accurately recreates the original code, browsers appear to parse dynamically created code differently than static code. Infrequently, some scripts may lose some functionality after compression. But most don't.
And, yes, this entry has been compressed using itself - 5588 bytes to 4657 bytes.