Binary file byte ordering
- From: groufosse@xxxxxxx
- Date: Tue, 22 Jan 2008 09:49:20 -0800 (PST)
Hello:
I have a question that I hope someone experienced with Delphi can
answer...
I am using a program to read a binary file that was written in Delphi.
The data is Delphi's extended
precision type, which is 10 bytes. I need to convert those over to a
double precision number (8 bytes)
Here's the question: exactly how does the Delphi compiler interpret
those 10 bytes? I'll take a step
back....I know that the actual readfile is done by a win32 call
through windows app. So I guess
I have 2 questions:
1 - How are the bytes ordered when they are read in? This is critical
because I am reading
in a byte at a time (as U8)
2 - What is the ordering of the bytes....The endian-ness?
I have an algorithm to convert the byes that constitute the extended
precision to doubles,
but I guess it won't be very useful if I cannot get the byes ordered
correctly!
Thank you for any help!
Regards, Gary.
.
- Follow-Ups:
- Re: Binary file byte ordering
- From: alanglloyd@xxxxxxx
- Re: Binary file byte ordering
- From: Jamie
- Re: Binary file byte ordering
- From: Dr J R Stockton
- Re: Binary file byte ordering
- From: Rudy Velthuis
- Re: Binary file byte ordering
- From: Rudy Velthuis
- Re: Binary file byte ordering
- Prev by Date: Re: Send email with barcode
- Next by Date: Re: Binary file byte ordering
- Previous by thread: procedure ( a : integer; b : integer; ); would be nice.
- Next by thread: Re: Binary file byte ordering
- Index(es):
Relevant Pages
|