The Swift library includes the function bigEndian that can be used on integer types (such as Int, UInt, UInt8, UInt64
bigEndian
Int
UInt
UInt8
UInt64