Merge pull request #3 from VideahGams/patch-1

Readme syntax highlighting
This commit is contained in:
Robin Wellner 2016-04-03 21:16:13 +02:00
commit cf02122d22

View File

@ -5,15 +5,17 @@
Serializes and deserializes Lua values with LuaJIT. Serializes and deserializes Lua values with LuaJIT.
local bitser = require 'bitser' ```lua
local bitser = require 'bitser'
bitser.register('someResource', someResource) bitser.register('someResource', someResource)
bitser.registerClass(SomeClass) bitser.registerClass(SomeClass)
serializedString = bitser.dumps(someValue) serializedString = bitser.dumps(someValue)
someValue = bitser.loads(serializedString) someValue = bitser.loads(serializedString)
serializedData = love.filesystem.newFileData("filename") serializedData = love.filesystem.newFileData("filename")
someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize()) someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize())
```
Pull requests, bug reports and other feedback welcome! :heart: Pull requests, bug reports and other feedback welcome! :heart: