In Swift, how does one assign Data to array of UInt32?
问题 I have Swift code which reads a binary file representing a sequence of UInt32 values like this: let fileData = binaryFile.readData(ofLength: 44) guard fileData.count > 0 else { break } let headerData = fileData.withUnsafeBytes { Array(UnsafeBufferPointer<UInt32>(start: $0, count: 11)) } let polyCount = headerData[1].bigEndian let polyFlags = headerData[2].bigEndian I'd not used the program containing this code for a while, but when returning to it recently, it still works as expected, but now