Reading Binary Data in Little Endian Format

Dave dave at
Tue Jan 8 06:08:57 EST 2008

Happy New Year to All!

Does anyone know of an easy way to read a 4 bytes (32 bit) little  
endian number from a file?

I am running on a Mac and the file I am trying to process *always* is  
stored in Little Endian Format, for instance:

The number 0x00000000BC   (188) is stored in the file as:

0xBC000000 (a VERY large number!)

I want to get 188 when I read these four bytes.

Any ideas???

Thanks a lot
All the Best

More information about the use-livecode mailing list