View Single Post

   
  #2 (permalink)  
Old 01-16-2008, 11:34 AM
Thomas Tornblom
 
Posts: n/a
Default Re: Question On Endianness And Solaris Sparc Versus IA32 FileSystems

There is no way you can automatically compensate for this. It depends
entirely on the data contained in the file.

If all the data are 1 byte wide, like in an ascii file, there is
nothing you need to do, it is already correct for. If it contains only
2 byte shorts, then you need to swap them pairwise, if they are 4 byte
ints, you need to do quad swapping, etc. Frequently the data is a mix
of data types, and unless you know exactly how it is laid out, you
can't work around the problem in any simple manner.

This has nothing to do with the filesystem type, it is only a problem
of the file content.


Reply With Quote