Reimplment msgpack