mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
Readme syntax highlighting
Just to make things more readable <3
This commit is contained in:
parent
2ad9e981bd
commit
2289d5a380
16
README.md
16
README.md
@ -5,15 +5,17 @@
|
||||
|
||||
Serializes and deserializes Lua values with LuaJIT.
|
||||
|
||||
local bitser = require 'bitser'
|
||||
```lua
|
||||
local bitser = require 'bitser'
|
||||
|
||||
bitser.register('someResource', someResource)
|
||||
bitser.registerClass(SomeClass)
|
||||
bitser.register('someResource', someResource)
|
||||
bitser.registerClass(SomeClass)
|
||||
|
||||
serializedString = bitser.dumps(someValue)
|
||||
someValue = bitser.loads(serializedString)
|
||||
serializedData = love.filesystem.newFileData("filename")
|
||||
someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize())
|
||||
serializedString = bitser.dumps(someValue)
|
||||
someValue = bitser.loads(serializedString)
|
||||
serializedData = love.filesystem.newFileData("filename")
|
||||
someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize())
|
||||
```
|
||||
|
||||
Pull requests, bug reports and other feedback welcome! :heart:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user