[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple pickler
- From: Thomas Lauer <thomas.lauer@...>
- Date: Thu, 17 May 2007 16:53:00 +0100
after fiddling with your code a little, it now works like a charm...
fast and efficient. Here are two further small remarks:
local TREF = 9
local TGUARD = 10
the numerical values could usefully be a little bigger to allow for
further storable lua types (I've used 254 and 255, which is probably a
2) As your functions read and write a binary format (as compared to some
other pickle()'s I've seen which produce Lua table initialisation code),
how about writing a small signature (2 or 4 byte) with a version id at
the start of the file? This way future versions can read "old" dumps in
a backwards-compatible manner.
Thank you very much for sharing that. For one thing, I would not have
thought of storing functions as your code does.
web : http://thomaslauer.com/start