Here's various resources on packing and unpacking C structures.
-  The Lua string library, including [string.byte] and [string.char], along with BitwiseOperators, provide very rudimentary functions for doing this.
 -  [lpack] (5.0/5.1) - a library for packing and unpacking binary data, written in C.  (LuizHenriqueDeFigueiredo)
 -  [struct] (5.1/5.2) - another library for packing and unpacking binary data, written in C.  (RobertoIerusalimschy)
-  [2] - extensions by Flemming Madsen
 -  [Alien] "uses a slightly modified version of Roberto Ierusalimschy’s struct library that can unpack binary blobs (userdata) instead of just strings".  notes: LuaList:2009-10/msg00489.html
 -  [luafiveqplus] includes a descedent of Roberto's library, including (most of) Flemming Madsen's extensions and a size function from Alien. It also ensures that unpack won't crash the program by overflowing Lua's C stack.
 
 -  [Lunary] (5.1) - another library for packing and unpacking binary data, written in C.  ([differences from other libraries])  (Jérôme Vuarand)
 -  [vstruct] (5.1/5.2 & luaJIT) - a library for packing and unpacking binary data, written entirely in Lua, using the string library. (Ben Kelly)
 
Notes/Examples:
Other programming languages cross reference:
RecentChanges · preferences
edit · history
Last edited June 1, 2013 6:14 pm GMT (diff)