tiny-lzw.js [625b] - tiny-lzw-min.js.gz [307b]
The t.zip-Codec requires only tiny.js. Other scripts are not necessary.
The Methods .enc and .dec take a string as argument and return the LZW en- re decoded string.
(function() { function test() { var data=t('#testinput').v(), to=t.zip.enc(data), l=data.length, L=l+1, i=0; t('#to').h(to+'   <b>'+((to.length*100/data.length)|0)+'%</b>'); t('#re').h(t.zip.dec(to)); } t('#test').e('mousedown', test); })();
© 2010 Alex Kloss