Monthly Archives: September 2006

Java2Script SWT Widgets Updates

The updates mainly include Combo, Spinner, Menu, ToolBar and CoolBar. For more details, please check out latest sources from SVN, or stay tuned for 1.0.0 M4 scheduled in the next month.

Posted in Java2Script News, Screenshot, SWT | Leave a comment

LZ77 JavaScript Compressor Reloaded

Updated: June 4, 2007, LZ77 JavaScript Compressor http://demo.java2script.org/lz77js/ is rebuilt using Java2Script Simple RPC technology.

In early of this year, I had a post “LZ77-JS-Compressor: Another way of compressing JavaScript“. It seemed that lots of people were seeking pure LZ77 JavaScript Compressor, and some of them clicked the above post. And the above link is on the top 2 position for key world “js compressor” in Google.

As mentioned in the above post, pure JavaScript decoder’s performance was very poor for large *.js file (>200k)! So I stopped focusing on further development of LZ77 JS compressor after the post. So no technical details were found there but pure LZ77 JS compressor’s poor performance was told there.

But as top 2 position link for key world “js compressor” in Google, I decide not to disappoint visitors with no discrete implementations any more. Here now, I give an implementation (Thanks for J2S 1.0.0 M3, so such a solution does not require much time and pains):

LZ77 JavaScript Compressor“: This is a J2S/SWT application, sending the raw JavaScript sources back to server to do LZ77 compressing (Java servlet). (Mentioned: the server s eems being unstable with low bandwidth.)

J2S SWT LZ77 JavaScript Compressor

If you uncheck “RegExp trimming before LZ77” option in the above application, you can compress any plain text (HTML/CSS/SVG/…) besides JavaScript sources.

This LZ77 implementation was considered as buggy. I used in J2S Clazz.

BTW: Developing the above J2S/SWT application (including wrapping the old LZ77 utilities into a servlet) took me about 2 hours.

For JS compressor, I recommend you to use Dean’s Packer.

PS: “LZ77 JavaScript Compressor” is now using LZ77-JS-Comopresser compressed JavaScript: http://bl.ognize.com/j2s-ajax-rss-reader/net.sf.j2s.lib_1.0.0.v320/j2slib/j2slib.lz77.z.js (30k) rather than earlier http://bl.ognize.com/j2s-ajax-rss-reader/net.sf.j2s.lib_1.0.0.v320/j2slib/j2slib.z.js (55k)

Posted in AJAX, JavaScript, Sharing | 4 Comments