Closed yihuang closed 11 years ago
local mp = require 'cmsgpack' local tbl = {['1']=1} local s = mp.pack(tbl) print('length:', #s) print('first byte:', string.byte(s, 1))
The table {['1']=1} is encoded to \x90, which is for [].
{['1']=1}
\x90
[]
The script above output like this:
length: 1 first byte: 144
The table
{['1']=1}
is encoded to\x90
, which is for[]
.The script above output like this: