On Fri, 13 Oct 2006, Tim Pease wrote:

> On 10/12/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
>> On Fri, 13 Oct 2006, Tim Pease wrote:
>> >
>> > No problem. Take a look at bit-struct if you find yourself needing to
>> > do some more complex packing and unpacking of binary data ...
>> >
>> > http://raa.ruby-lang.org/project/bit-struct/
>> >
>> > Blessings,
>> > TwP
>> 
>> have you been using this for your stuff tim?
>> 
>
> No, we've just been parsing very large pixel images.  No complex data
> structures.  Read four bytes, mask off the hamming code and error
> bits, store the pixel data in an mmap cache, repeat until EOF.

have you looked into using narray?  then you can mask the entire image at
once.  i have code that turns an mmap into an narray - it's quite simple.  got
a sample file?

-a
-- 
my religion is very simple.  my religion is kindness. -- the dalai lama