8000 GitHub - erdian718/lmodmsgpack: MessagePack for Lua.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class="">

erdian718/lmodmsgpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmodmsgpack

MessagePack for Lua.

Usage

package main

import (
	"ofunc/lmodmsgpack"
	"ofunc/lua/util"
)

func main() {
	l := util.NewState()
	l.Preload("msgpack", lmodmsgpack.Open)
	util.Run(l, "main.lua")
}
local msgpack = require 'msgpack'

local x = msgpack.encode(v)
local y = msgpack.decode(x)

Dependencies

Documentation

msgpack.encode([w, ]v1[, v2, ...])

Encodes the values. If writer w is provided, the encoded data will be writed to w. Otherwise, the encoded data will be returned.

msgpack.decode(x[, i])

Decodes the fisrt value. x can be a reader or a string. i is the start position of the string, default value is 1.

Releases

No releases published

Packages

No packages published
0