How swab32 or bswap_32 works
If you have come across some code with reference to swab32 or bswap_32 and wondered how it works, here is the answer. swab32 will probably be a function that calls bswap_32 which will probably be a macro. The macro will probably be defined as: ( (((x) << 24) & 0xff000000u) | (((x) << 8) &… Read More »