On Nov 26, 2011, at 6:37 PM, Charles Srstka wrote: > If the source code that is sending you the data in the first place is your > own code, you could have that code use the CFConvertFloat32ToSwapped() before > sending it, and then your client can use CFConvertFloat32SwappedToHost() to > convert it back, nice and easily.
No, it is not my code, and I am reading data from a document, there is no server-client interaction. > > At any rate, HostToBig is not what you want in the client, since you’re > swapping it *to* the host byte order, not *from* it. CFSwapInt32BigToHost() > would be more correct in that case, even though the two functions will both > do the same thing in practice on a little-endian machine. Thanks for pointing that. They indeed give the same result. - Koen. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com