3 ms·
Does the example only work for little endian machines? It converts ‘http\0\0\0\0’ to a u64. In LE machines the \0 padding becomes the MSB so it’s fine to use th
by benmmurphy 4y ago
Does the example only work for little endian machines? It converts ‘http\0\0\0\0’ to a u64. In LE machines the \0 padding becomes the MSB so it’s fine to use this 4 byte 0xffffffff mask. But for BE machines the padding becomes the LSB so the mask compares the padding.