local u=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local c=require(u.hexDump)local N=require(u.Vendor.Packet)local z=N.Type local r=z.Message({id=z.UInt;name=z.String;alive=z.Bool(true),friends=z.Array(z.String)})local l=r.encode({id=5,name="\102\111\111",friends={"\098\097\114";"\098\097\122"}})local s=r.decode(l)print(string.format("\112\097\099\107\101\100 \037\105 \098\121\116\101\115",#l))print(c(l))print("\117\110\112\097\099\107\101\100 \100\097\116\097\058",s)
local RepStore = game:GetService("ReplicatedStorage")
local hexDump = require(RepStore.hexDump)

local Packet = require(RepStore.Vendor.Packet)
local T = Packet.Type

local Player = T.Message({
	id = T.UInt,
	name = T.String,
	alive = T.Bool(true),
	friends = T.Array(T.String),
})

local packed = Player.encode({
	id = 5,
	name = "foo",
	friends = { "bar", "baz" },
})

local unpacked = Player.decode(packed)

print(string.format("packed %i bytes", #packed))
print(hexDump(packed))

print("unpacked data:", unpacked)
