Serializes and deserializes Lua values with LuaJIT
Go to file
2016-02-15 14:44:18 +01:00
cases add first version, including benchmarks 2016-02-14 03:52:58 +01:00
spec forgot to actually register the class i was testing 2016-02-15 14:39:41 +01:00
.travis.yml more testing and lint stuff 2016-02-15 14:34:52 +01:00
bitser.lua Actually pass the buffer to write_string for class names 2016-02-15 14:44:18 +01:00
conf.lua add first version, including benchmarks 2016-02-14 03:52:58 +01:00
main.lua add first version, including benchmarks 2016-02-14 03:52:58 +01:00
README.md more testing and lint stuff 2016-02-15 14:34:52 +01:00

bitser

Build Status

Serializes and deserializes Lua values with LuaJIT.

local bitser = require 'bitser'

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

serializedData = bitser.dumps(someData)
someData = bitser.loads(serializedData)

Pull requests, bug reports and other feedback welcome! ❤️

Why would I use this?

Because it's fast. Because it produces tiny output. Because the name means "snappier" or "unfriendlier" in Dutch. Because it's safe to use with untrusted data.

Because it's inspired by binser, which is great.

How do I use the benchmark thingy?

Download zero or more of binser.lua, ser.lua, smallfolk.lua and serpent.lua, and run:

love .

You do need LÖVE for that.

You can add more cases in the folder cases/ (check out _new.lua), and add other serializers to the benchmark in main.lua. If you do either of those things, please send me a pull request!

You can register classes?

Yes. At the moment, bitser supports MiddleClass, SECL, hump.class and Slither (and probably some other class libraries by accident).

What license is this under?

None yet. It will be open source (probably MIT license) in the near future, but it needs more testing before it's production ready.