我是 swift/xcode 的新手,我正在尝试使用 crc32 函数,正如这里提到的,它是在 libz.dylib 的 zlib 中提供的。
我已经修改了代码,以便我现在尝试:
let message1 = "some message".first?.value!.data(using: String.Encoding.utf8, allowLossyConversion: false)
let crc = crc32(CLong(0), UnsafePointer<Bytef>(strcat!.bytes), UInt(message1!.length))
但是我遇到了错误:use of unresolved identifier 'crc32'。
谁能帮我弄清楚在尝试使用 crc32 函数时我可能会遗漏哪一步?
谢谢!