[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] lua-marshal - fast table serialization
- From: Richard Hundt <richardhundt@...>
- Date: Mon, 03 Jan 2011 12:34:34 +0100
I thought I'd throw this little lib over the wall in the hope that
somebody finds it useful:
This is from the README:
Fast table serialization for Lua
s = table.marshal(t) - serializes a table to a byte stream
t = table.unmarshal(s) - deserializes a byte stream to a table
t = table.clone(orig) - deep clone a table
Serializes tables, which may contain cycles, Lua functions with upvalues
and basic data types.
Coroutines are not serialized and nor are userdata, however support
for userdata the __persist metatable hook can be used.
The top level object must be a table. Metatables and function
environments are not serialized.
Cheers and happy new year.