Dean Edward’s packer: A JavaScript compressor
If you’re using JavaScript, you might consider using packer before deploying your code. It will compress your JavaScript code and in most cases will make your code smaller. When you use the compressed JavaScript online, it will result in bandwidth savings.
The method is simple, copy your code on the Paste text box, select whether you want to use Base62 encode and Shrink variables option, and click the Pack button. The documentation says that you must terminate statements, including function declarations, with semicolon so you better abide it.
When you don’t select any options, packer will simply remove all useless white space and comments. If you choose Shrink variables, packer will rename variable names inside a function. The craziest thing is when you choose Base62 encode. It’ll regard your code as a string to be compressed, and then compresses it, then gives you the self-extracting-and-executing JavaScript code.
I tried compressing misc.js, the script that contains various helper functions for my AJAX Japanese IME final project. With all the options turned on, the compressed code is only 32.4% of the original :).
Tags: compression, obfuscation, packer











