How to unzip a string in JavaScript that has been compressed using SharpZipLib -


i having trouble decompressing string in javascript. there xml file saved database. before saved compressed using sharpziplib in vb application.

i writing web application receives compressed string through web api using json. trying decompress string original xml format can used on client side. trying using javascript have not come across way decompress string.

below example of code trying use zlib.js.

var buf = new arraybuffer(graphic.length); var bufview = new uint8array(buf); (var = 0; < graphic.length; i++) {     bufview[i] = graphic.charcodeat(i); } var inflate = new zlib.inflate(compressed); var plain = inflate.decompress(); 

i receive error saying 'error: unsupported compression method'.

i able use example compress , decompress string using zlib.js i'm wondering there different compression method being used in sharpziplib.

i have tried using js-inflate.min.js inflate string returns empty string.

// using js-inflate.min.js var uncompressed2 = jsinflate.inflate(graphic); 

is there way decompress compressed string in javascript? sharpziplib use gzip or other compression method causing problem?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -