Below is a mini web application that does a simple replacement of repeated words and phrases with single characters and then packs to a self extracting JavaScript.
Try the *NEW* 32KB JavaScript Packer (works better and it features full AST walking, error fixing, JS parsing and code rewrite through a heavily modded UglifyJS) that was originally a 200KB HTML5 web app (minified, packed and compressed inside a SVG image), plus it used to rely on a bloated 120KB JQuery file (rewrote that crap out, I hate JQuery).
This packer (below) is much more aggressive. It looks for any word, phrase, character or punctuation repetition to switch with single characters and then everything gets packed to a self extract/auto executing JavaScript.