JS1k runs again this year, I’ve developed The 1k Notebook, using JSCrush to compress the source and reach the 1024 chars target. The compressor works by searching repetitive patterns in the source and replace them by tokens of chars in a single string. Then, one short piece of code is added at the end to uncompress the string and execute it, more detailed explanation here. This technique achieves high compression rates when the demo uses lot of long function calls or many similar code patterns.
Got lot of feedback asking for the source code of my demo, so a blog post explaining how it’s made is coming (all questions will be answered there). What annoys me are the comments about “lost of pure scripting” and “the contest lost the magic when encryption was allowed”. WTF?
Introducing JSUncrush. It takes any compressed source and output the original script. Un-minify by hand to learn!