msgpack-erlang
msgpack-erlang copied to clipboard
Conflict using Redis and msgpack-erlang with {spec, old} - {error,incomplete}
Erlang/OTP 20 Eshell V9.3 msgpack-erlang version 0.7.0
If you encode data with old spec msgpack:pack(List, [{spec, old}]). Then write the data in Redis and apply to the data cmsgpack.unpack and cmsgpack.pack Then decode the data in erlang msgpack:unpack(Binary, [{spec, old}]). We can receive {error, incomplete}
The old specification msgpack https://github.com/msgpack/msgpack/blob/master/spec-old.md does not use HEX 0xd9
But Redis cmsgpack.pack and cmsgpack.unpack allow the use of 0xd9 https://github.com/antirez/redis/blob/unstable/deps/lua/src/lua_cmsgpack.c#L182 https://github.com/antirez/redis/blob/unstable/deps/lua/src/lua_cmsgpack.c#L691
Now if use cmsgpack.pack and cmsgpack.unpack in Redis, you get {error, incomplete} in erlang.
Is it possible for the old specification to optionally allow the use of 0xd9?
Thank you!
In msgpack-erlang version 0.3.6, everything works well with Redis.