Best method to compress JSON string in term of performance and compress radio

Posted by Eric Yin on Stack Overflow See other posts from Stack Overflow or by Eric Yin
Published on 2012-03-26T23:24:31Z Indexed on 2012/03/26 23:30 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

For a JSON string, contains all kinds of settings, numbers, string etc. Total JSON string fairly fall into 10k~50K range.

I want to compress it before save to database.

So I wonder which compress method should I choose, I am using c# 4, I know I can choose gzip and deflate but the compression radio is not good (although speed is good).

More specific, compress can be a little slow (since only once) but should be small. Decompress should be lighting fast since decompress happens lots.

Please give some advice.

© Stack Overflow or respective owner

Related posts about c#

Related posts about compression