def bswap
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytesimport Base
582# Byte 0 of w becomes the most significant, so words compare in byte order.
583def bswap(+w: U32) -> U32:
584 ((b8(w) << 24n) .|. (b8(U32.shrn(w, 8n)) << 16n) .|. (b8(U32.shrn(w, 16n)) << 8n) .|. U32.shrn(w, 24n) : U32)