I have a a binary file format with a bunch of headers and floating point data, worthy to note this fileformat uses big-endian. The structure looks like this:
Header [240 byte]
Data [x byte]
Header [240 byte]
Data [x byte]
and so on...
Parsing the headers works fine, I get the correct output for every file. The problem is with the "Data" The documentation says it is in 4-byte IBM floating-point.
As far as I know the C++ float
structure uses the IEEE standard so probably my problem is the conversion.
I sholud find some way to convert the IBM floating-point to IEEE floating point.
Question: Is it possible? How/Where should I start, if I have very poor knowledge with these basic structures?