Joel VanderWerf wrote: > Another option: > > http://redshift.sourceforge.net/bit-struct/ > > I don't know bindata, but from a quick glance at the docs I see that it > does handle related fields, like length fields that specify the length > of another field. BitStruct does *not* do that. > > Another difference is that BitStruct is a subclass of string, so it is > very efficient to send a bitstruct to a socket or file or perform other > string operations. amazing performance, for creating 10k instances of the same simple struct (ruby 1.9 rc1): user system total real bindata 3.681000 0.000000 3.681000 ( 3.827000) bit-struct 0.063000 0.000000 0.063000 ( 0.057000) so bit-struct is actually a good choice for networking without any modifications -- Posted via http://www.ruby-forum.com/.