Difference between revisions of "bitser"

m (Fixed github link)
m
 
(One intermediate revision by one other user not shown)
Line 16: Line 16:
 
{{#set:LOVE Version=Any}}
 
{{#set:LOVE Version=Any}}
 
{{#set:Description=Serializes and deserializes Lua values with LuaJIT}}
 
{{#set:Description=Serializes and deserializes Lua values with LuaJIT}}
 +
{{#set:Keyword=Serializing}}
 
{{#set:License=ISC}}
 
{{#set:License=ISC}}
 
{{#set:Author=User:Robin}}
 
{{#set:Author=User:Robin}}
 
[[Category:Libraries]]
 
[[Category:Libraries]]
 +
== Other Languages ==
 +
{{i18n|bitser}}

Latest revision as of 16:00, 15 December 2019

bitser is a serialization library for LuaJIT. It's very fast, produces tiny output and safely handles untrusted input.

local bitser = require 'bitser'

bitser.register('someResource', someResource)
bitser.registerClass(SomeClass)

serializedString = bitser.dumps(someValue)
someValue = bitser.loads(serializedString)
love.filesystem.write("filename", serializedString)
serializedData = love.filesystem.newFileData("filename")
someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize())

Get bitser from its GitHub repositiory.

Other Languages