1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
I use "deflate" (RFC1951) implementation in Javascript from: 
https://github.com/dankogai/js-deflate 
whic is a forks from 
http://www.onicos.com/staff/iz/amuse/javascript/expert/

Other Javascript deflate implementation: 
http://www.codeproject.com/KB/scripting/Javascript_binaryenc.aspx?msg=2963332
and inflate imlementation is in message but I do nto check it except you need to add to }} on end of this source code 
http://www.codeproject.com/KB/scripting/Javascript_binaryenc.aspx?msg=3688161#xx3688161xx

Base64 javascritp implementation:
http://code.google.com/p/stringencoders/source/browse/trunk/javascript/base64.js

I use Google's V8 Javascript engine ( http://javascriptdotnet.codeplex.com/ ) on server side to run Javascript code which I run on client side in web browser if you need it.

Deflate:
http://tools.ietf.org/html/rfc1951
http://en.wikipedia.org/wiki/DEFLATE

For all of this source code I use Javascript unpacker and beautifier:
http://jsbeautifier.org/