Lua MsgPack library written in C.
Clone the code to the
3rddirectory.Run the
make buildcommand to start compiling.If there are no errors, the compilation is successful.
localmsgpack=require"msgpack"localmsgpack=require"msgpack"-- mapprint(msgpack.encode { a=1, b=2, c=3, list= { 'a', 'b', 'c' } })
-- arrayprint(msgpack.encode { true, false, null, 1, 2.2, "admin", list= { 1, 23}, map= { a=1} })require"utils"localmsgpack=require"msgpack"var_dump(msgpack.decode('\x82\xa1a\xc2\xa1b\xc3'))
var_dump(msgpack.decode('\x92\xc2\xc3'))