top | item 33530694

(no title)

siknad | 3 years ago

Reversing bytes sounds like reversing their bit orders to me.

discuss

order

XCSme|3 years ago

That would be "bitreverse" I guess, plus their description of byteswap[0] is exactly that:

"Reverses the bytes in the given integer value n."

I would expect the description for "byteswap" to be something like "swaps the given bytes of an integer value n." and be called like byteswap(x, a, b), where a and b are the indicies of the bytes to be swapped.

[0]: https://en.cppreference.com/w/cpp/numeric/byteswap

fluoridation|3 years ago

Could be called "byte-wise reverse".