Re: "byte orders" question
Re: "byte orders" question
- Subject: Re: "byte orders" question
- From: Koen van der Drift <email@hidden>
- Date: Sat, 26 Nov 2011 18:44:07 -0500
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 (email@hidden)
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:
This email sent to email@hidden