Oh, yeah, I forgot to show that you can use a BitStruct to parse strings according to your defined format: Joel VanderWerf wrote: > require 'bit-struct' > > class C < BitStruct > signed :foo, 32, "Something signed" > unsigned :bar, 32, "Something UNsigned" > end c = C.new(socket.recv(...)) p c.foo and so on. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407