开发者

Compressing a string in C# and Decompressing it in Actionscript

I am new to programming (have mostly worked with ASP.Net) and have been trying to compress a string in C# and decompress it in ActionScript for quite some time now.

I Was Successful with Zlib but need another implementation for the same using a different Compression Algorithm.

I tried Gzip using this code in C# : http://madskristensen.net/post/Compress-and-decompress-strings-in-C.aspx i got the output Displayed in a label to copy it and pasted the same in actionscript using http://probertson.com/projects/gzipencoder/

i converted the input string into a bytearray first using the base64 library :http://garry-lachman.com/2010/04/21/base64-encoding-class-in-actionscript-3/ and then passed it to the gzip encoder.

But i get an error where it says that the input is not in gzip format.

i am also trying to use LZW Compressi开发者_开发百科on with no success in compressing in LZW in C#. so have not tried LZW Decompression in ActionScript Either.

So .... i.m stuck at : I need to compress a string in C# and Decompress it in ActionScript using a compression Method other than ZLib. ... Kindly Guide.


maybe there is a problem with the string encoding. Do you have utf8 in actionscript? Or you could change the encoding in your c# encoder. Maybe: Encoding.GetEncoding("iso-8859-1");

also make sure that both of your base64 implementations work correctly with each other. So I would make a test case using only those two base64 implementations

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜