import Foundation extension Array where Element == UInt8 { func convert(to _: T.Type) -> T { withUnsafeBufferPointer { $0.baseAddress!.withMemoryRebound(to: T.self, capacity: 1) { $0.pointee } } } }