[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1-5.3 serialization library
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Tue, 20 Jan 2015 21:57:46 +0000
For what it's worth my dump module  handles cycles, very large
tables (may require some tweaks to the splitting threshold depending
on your data) and 5.3. It's in pure Lua, and the output is designed to
be human-readable and sensibly organized, so it's not very fast. But
I've used it in the past for offline processing of multi gigabyte
datasets, so it should work for you.
2015-01-19 15:12 GMT+00:00 Timm S. Mueller <email@example.com>:
> On Mon, 19 Jan 2015 16:03:16 +0100
> Philippe Lhoste <PhiLho@GMX.net> wrote:
>> On 14/01/2015 13:51, Timm S. Mueller wrote:
>> > before I'm starting to write my own, I'm looking for a serialization
>> > and deserialization library. Requirements:
>> > - must cover Lua 5.1, 5.2, 5.3 and LuaJIT
>> > - in the MIT/BSD/CC/PD license department
>> > - must cover cyclic references and binary data
>> > - preferrably written in C for performance, Lua would be fine also
>> > - should only use official Lua APIs, no outside dependencies, no state
>> > internals
>> > - The transport format should be legal Lua, but this isn't strictly a
>> > requirement and may be sacrificed if the result can be transported,
>> > preferrably also between different architectures and Lua versions. I'm
>> > not objecting to using JSON format either.
>> > Not required: Userdata, metatables, functions and upvalues. A small
>> > footprint and the ability to operate on a writer/readers would be nice.
>> > Any ideas, recommendations?
>> Some years ago, I wrote my own function for this.
>> It doesn't support... precisely what you rule out, so it should be OK for you.
>> It does have the small footprint, covers cyclic references, is pure Lua, so it might still
>> work in recent versions of Lua...
>> Not sure what you mean by "cover binary data" if you don't require to support userdata.
>> If that's "binary data in string", you can just add something changing control chars to
>> their escapes to the string serializations.
> I meant binary data in strings.
>> License is the zlib/libpng one, a simpler derivative of the BSD license.
> Thank you, added to my testbed.
> This one gives nice output.
> - Timm
> Timm S. Mueller <firstname.lastname@example.org>
> Schulze & Mueller GbR, Jungstr. 2, 10247 Berlin,
> Gesellschafter: Franciska Schulze, Timm S. Mueller,
> Tel. +49 30 85610000, http://www.schulze-mueller.de/