[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] vstruct - 1.0 beta 2
- From: Asko Kauppi <askok@...>
- Date: Fri, 25 Jul 2008 19:42:07 +0300
To any ANN: posters (including myself).
Please have the first chapter describe "what" your product/solution/
etc. is about.
Without needing to press a URL.
Ben Kelly kirjoitti 25.7.2008 kello 1:19:
Wow, it's been a while. Got distracted by various things, but now
is here. Comments, criticisms, bug reports, feature requests, and
patches are welcome.
What is it?
A library for packing and unpacking binary data, not unlike lhf's
or Roberto's struct library.
What's changed since beta 1?
- IEEE 754 floating point support added, thanks to Peter Cawley
<firstname.lastname@example.org> - floats and doubles (but not quads) are supported.
- Counted string support added (strings prefixed with their length
- Fixed a bug in the m format causing potential data loss with
wider than 6 bytes
- Added some stuff to the documentation.
Why use it?
- read and write support for signed and unsigned integers, fixed point
rationals, fixed-length, counted, null-terminated and null-padded
strings, skipping and padding, booleans, and bitmasks
- unpack/pack from/to strings, files, or anything that supports
file-like :read, :write (and optionally :seek) operations
- any type can be any byte-aligned width - 24-bit integers? booleans
stored as uint32_ts? 128-bit masks? No problem.
- supports naming, grouping and repetition of fields (and groups,
arbitrarily deep). You can specify the structure of the data in the
format string and get back a table with conveniently named fields (and
possibly subtables); and then you can unpack an array of 10,000 of
just by putting "* 10000" on the end.
- written entirely in Lua, and thus very portable and easy to extend.
Why NOT use it?
- written entirely in Lua, and thus slower and more memory-hungry
- no support for bit-aligned fields (yet - planned for 1.1)
What's planned for beta 3?
- Fixes for any bugs reported in beta 2
What's planned for 1.1?
- Bit-aligned field support, for those of you who want to unpack TCP
headers with it :)
Where is it?
The beta 2 package can be found in tar.bz2 format here:
The project is also available via public read-only git repository:
This release is available from that repository from tag
Documentation and credits are in the README. Put it someplace in your
LUA_PATH which looks for "?/init.lua".