See the current usage:
open MsgPack
[| 1uy; 2uy; 3uy |]
|> Array.map (Value.UInt8)
|> Value.Array
|> Packer.packOne
//=> val it : byte [] = [|147uy; 1uy; 2uy; 3uy|]
Unpacker.unpack [|147uy; 1uy; 2uy; 3uy|]
//=> val it : MsgPack.Value [] = [|Value.Array [|Value.UInt8 1uy; Value.UInt8 2uy; Value.UInt8 3uy|]|]
This is the one of botheration. 👎
We need another pack and unpack which are simpler and easier to use like following:
open MsgPack
[| 1uy; 2uy; 3uy |]
|> Packer.pack
//=> val it : byte [] = [|147uy; 1uy; 2uy; 3uy|]
Unpacker.unpack [|147uy; 1uy; 2uy; 3uy|]
//=> val it : byte [] = [|1uy; 2uy; 3uy|]
See the current usage:
This is the one of botheration. 👎
We need another
packandunpackwhich are simpler and easier to use like following: