how to convert big-endian numbers to native numbers delphi
- by steve0
hi all
i want to know how to convert big endian numbers to native numbers in delphi
i am porting some c++ code in that i came accross this part
unsigned long blockLength =
*blockLengthPtr++ << 24; blockLength |= *blockLengthPtr++ << 16;
blockLength |= *blockLengthPtr++ <<
8; blockLength |= *blockLengthPtr;
unsigned long dataLength =
*dataLengthPtr++ << 24; dataLength |= *dataLengthPtr++ << 16;
dataLength |= *dataLengthPtr++ <<
8; dataLength |= *dataLengthPtr;
i am not familiar with c++ ,so i didnt understand what those operators doing
can any one help ?
regards