Skip to content Skip to sidebar Skip to footer

How To Decompress A String In Javascript, Compressed In C#?

Possible Duplicate: ZLIB Decompression - Client Side I'll try to be clear and I'm sorry for my bad english. This is the question: In my web application i received a string that

Solution 1:

The best solution might be to translate the decompression function from C# to Javascript. You could use one that's already available in Javascript such as this one, but you would need to change the source of the image or uncompress-recompress at the server, unless it happens to be compatible with the compression you're using.

Another option would be to convert the image in to .jpg or .png before you use it, again at the server. This would give you more flexibility in the long run, but might put a load on the server depending on traffic and image size.


Solution 2:

You can use JSXCompressor library to do decompression (deflate, unzip).

But if your web server support compression at http level I think you can skip compression and decompression.


Post a Comment for "How To Decompress A String In Javascript, Compressed In C#?"