func NewTagHex(ls *lua.LState) int {
	var val = ls.CheckString(1)
	var ds, _ = hex.DecodeString(val)
	PushTag(ls, &LuaTag{ds})
	return 1
}
NewTagHex constructs LuaTag by given hexadecimal data representation.
package luawpk
import (
	"encoding/base64"
	"encoding/hex"
	"github.com/schwarzlichtbezirk/wpk"
	lua "github.com/yuin/gopher-lua"
)
const TagMT = "tag"
type LuaTag struct {
	wpk.Tag
}
func RegTag(ls *lua.LState) {
	var mt = ls.NewTypeMetatable(TagMT)
	ls.SetGlobal(TagMT, mt)
	ls.SetField(mt, "newhex", ls.NewFunction(NewTagHex))
	ls.SetField(mt, "newbase64", ls.NewFunction(NewTagBase64))
	ls.SetField(mt, "newstring", ls.NewFunction(NewTagString))
	ls.SetField(mt, "newbool", ls.NewFunction(NewTagBool))
	ls.SetField(mt, "newuint16", ls.NewFunction(NewTagUint16))
	ls.SetField(mt, "newuint32", ls.NewFunction(NewTagUint32))
	ls.SetField(mt, "newuint64", ls.NewFunction(NewTagUint64))
	ls.SetField(mt, "newnumber", ls.NewFunction(NewTagNumber))
	ls.SetField(mt, "__index", ls.NewFunction(getterTag))
	ls.SetField(mt, "__newindex", ls.NewFunction(setterTag))
	ls.SetField(mt, "__tostring", ls.NewFunction(stringTag))
	ls.SetField(mt, "__len", ls.NewFunction(lenTag))
	for name, f := range methodsTag {
		ls.SetField(mt, name, ls.NewFunction(f))
	}
	for i, p := range propertiesTag {
		ls.SetField(mt, p.name, lua.LNumber(i))
	}
}
func PushTag(ls *lua.LState, v *LuaTag) {
	var ud = ls.NewUserData()
	ud.Value = v
	ls.SetMetatable(ud, ls.GetTypeMetatable(TagMT))
	ls.Push(ud)
}