RE: Reading SleepyHead Binary Files
looks like 7:00 in the morning was way too early for me^^
forgot the types on this 2 in the header:
hope I did not forget something else .. or worse: made some mistakes^^
one more thing to make the c++-part more clear:
something like that is a typecast ... meaning it gets converted to the type in the brackets.
all QT-types are prefixed with a 'q' (basically they are the same as without the q ... it's just for making the code portable across different operating systems and compilers)
so quint16 = unsigned integer 16 bits
qint32 = (signed) integer 32 bits
forgot the types on this 2 in the header:
Quote:PHP Code:header << datasize; // int32 - the size of the actual data AFTER the header in bytes.
header << chk; // uint16 - checksum - should 0 - if it is not it is the checksum for the compression
hope I did not forget something else .. or worse: made some mistakes^^
one more thing to make the c++-part more clear:
PHP Code:
(quint16)filetype_data;
something like that is a typecast ... meaning it gets converted to the type in the brackets.
all QT-types are prefixed with a 'q' (basically they are the same as without the q ... it's just for making the code portable across different operating systems and compilers)
so quint16 = unsigned integer 16 bits
qint32 = (signed) integer 32 bits