AnotherRedisDesktopManager
AnotherRedisDesktopManager copied to clipboard
pleaser support snappy uncompress
OS
Mac
VERSION
1.6.1
ISSUE DESCRIPTION
We use snappy to compress and uncompress the value, please support snappy! I try to use a custom formatter, but it doesn't work!
I go build https://github.com/golang/snappy
to generate exec. And use /user_path/snappy -d {VALUE} or -d {HEX}, but they doesn't work!
please have a look! thanks.
The hex representation needs to be converted into bytes and then passed to snappy. You can't pass {HEX}
directly.
The hex representation needs to be converted into bytes and then passed to snappy. You can't pass
{HEX}
directly.
Thanks to reply. I tried {VALUE}, it didn't work either. Can you tell me how to do? thanks.
The bytes will be passed like this: c0ed09...
. I implemented support for LZ4 in C# like this:
using System.Text;
using K4os.Compression.LZ4;
// this converts the hex into bytes two chars at a time
byte[] bs =
Enumerable.Range(0, args[0].Length)
.Where(x => x % 2 == 0)
.Select(x => Convert.ToByte(args[0].Substring(x, 2), 16))
.ToArray();
string result = Encoding.UTF8.GetString(LZ4Pickler.Unpickle(bs));
Console.WriteLine(result);
The bytes will be passed like this:
c0ed09...
. I implemented support for LZ4 in C# like this:
completely right, @Hawken94 the value passed to your script is hex value, you should convert it to bytes first