Je veux savoir comment convertir les nombres big-endian en nombres natifs en Delphi. Je suis un peu PORTAGE C++ code que je suis tombé sur:comment convertir les nombres big-endian en nombres natifs delphi
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;
Je ne suis pas familier avec le C++, donc je ne comprends pas ce que les opérateurs font.
duplication possible de [Comment convertir Big Endian et comment retourner le le plus haut bit?] (http://stackoverflow.com/questions/2882434/how-to-convert-big-endian-and-how-to-flip-the-highest-bit) –