Difference between revisions of "binser"

(Save and load games or any Lua data quickly and in a very compact format.)
 
m (Adding keyword.)
Line 1: Line 1:
 
{{#set:LOVE Version=Any}}
 
{{#set:LOVE Version=Any}}
 
{{#set:Description=Customizable Lua Serializer - Great for Saving Games}}
 
{{#set:Description=Customizable Lua Serializer - Great for Saving Games}}
 +
{{#set:Keyword=Serializing}}
  
 
'''binser - Customizable Lua Serializer'''
 
'''binser - Customizable Lua Serializer'''

Revision as of 12:21, 18 January 2017



binser - Customizable Lua Serializer

Save and load games or any Lua data quickly and in a very compact format.

Can Serialize:

  • Tables
  • Numbers
  • Strings
  • Booleans
  • Nan
  • Nil
  • Nested and Cyclic tables
  • Userdata (with setup)
  • Functions (pure functions with no upvalues)


Example:

local binser = require "binser"

local mydata = binser.serialize(45, {4, 8, 12, 16}, "Hello, World!")

print(binser.deserialize(mydata))
-- 45   table: 0x7fa60054bdb0   Hello, World!