Due to the limitation of javascript the way numbers are store, 64 bit integers can not represented correctly.
msgpack decodes a 64 bit number as ordinary javascript numeric type which is incorrect and looses precision.
n = "18446464814936021036"
x = [ 0xcf, 0xff, 0xff, 0x02, 0x04, 0x00, 0x00, 0xd8, 0x2c ]
a = msgpack.unpack(x)
a == 1844646481493602000 // not equal to n
unittest for this is incorrect too.
Need an alternate way to encode/decode 64 bit numbers to/from msgpack format
Due to the limitation of javascript the way numbers are store, 64 bit integers can not represented correctly.
msgpack decodes a 64 bit number as ordinary javascript numeric type which is incorrect and looses precision.
n = "18446464814936021036"
x = [ 0xcf, 0xff, 0xff, 0x02, 0x04, 0x00, 0x00, 0xd8, 0x2c ]
a = msgpack.unpack(x)
a == 1844646481493602000 // not equal to n
unittest for this is incorrect too.
Need an alternate way to encode/decode 64 bit numbers to/from msgpack format