Contents

decodeBytes(withReturnedLength:)

Decodes a buffer of data whose types are unspecified.

Declaration

func decodeBytes(withReturnedLength lengthp: UnsafeMutablePointer<Int>) -> UnsafeMutableRawPointer?

Discussion

NSCoder‘s implementation invokes decodeValue(ofObjCType:at:) to decode the data as a series of bytes, which this method then places into a buffer and returns. The buffer’s length is returned by reference in numBytes. If you need the bytes beyond the scope of the current @autoreleasepool block, you must copy them.

This method matches an encodeBytes(_:length:) message used during encoding.

See Also

Related Documentation

Decoding General Data