I want to save a large JSON to Redis. The size is: 5 MB, approximately.
Is there any way to zip the JSON, then save to Redis. And, I need it as getting the unzipped data from Redis is slow.
I want to save a large JSON to Redis. The size is: 5 MB, approximately.
Is there any way to zip the JSON, then save to Redis. And, I need it as getting the unzipped data from Redis is slow.
If you use the C# StackExchange.Redis library, it has the ability to store binary data as one of the overloads (byte[]). Then it's simply a matter of using the .NET compression library to go to and from compressed byte[].
Aside from that you would need to write the data yourself as an encoded string using RESP. See here: http://redis.io/topics/protocol