JavaScript bzip2 implementation
Latest commit a4a43a8 Nov 4, 2012 @kirilloid Merge pull request #1 from gbarco/master
bzip2-js decode


str argument should be a binary-string like result of readAsBinaryString from HTML5 FileAPI
Actually, javascript implementations uses utf-16(LE) for internal representation of strings
if you want to transfer data over http, keep in mind encoding, used at your server
for example, if you use bzcompress in php, it will return iso-latin-1 encoded string
and if your server uses utf-8, you'll need to utf8_encode result before output
or set proper encoding http header
Moreover, if you transfer bzipped utf8 texts, you'll need to transform the result of bzip2-decoding in js
Even though escape/unesapce functions are considered deprecated, I would advise the following code
function utf8_decode(str) { return decodeURIComponent(escape(str)); }
cause it have most balanced execution time across different browsers and input strings