lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>I know I have to do a  unpack like feature available in PERL or
>struct feature in Python, I dont know what is the equivalent in Lua. Can
>somebody point give me a cluestick?

Try this:

http://www.inf.puc-rio.br/~roberto/struct/

"This library offers basic facilities to convert 
Lua values to and from C structs. Its main functions 
are struct.pack, which packs multiple Lua values into 
a struct-like string; and struct.unpack, which 
unpacks multiple Lua values from a given struct-like 
string."

which is the one I like, or else:

http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lpack

"A library for packing and unpacking binary data."


Note who wrote each of the packages :-)