 		self.init(data: d)
 	}
 
+	/// Initialize a `Data` with copied memory content.
+	///
+	/// - parameter bytes: A pointer to the memory. It will be copied.
+	/// - parameter count: The number of bytes to copy.
+	public init(bytes buffer: UnsafeRawBufferPointer) {
+		let d = buffer.baseAddress == nil ? _swift_dispatch_data_empty()
+					: dispatch_data_create(buffer.baseAddress!, buffer.count, nil,
+							_dispatch_data_destructor_default())
+		self.init(data: d)
+	}
+
 	/// Initialize a `Data` without copying the bytes.
 	///
 	/// - parameter bytes: A buffer pointer containing the data.
 	/// - parameter deallocator: Specifies the mechanism to free the indicated buffer.
+	@available(swift, deprecated: 4, message: "Use init(bytes: UnsafeRawBufferPointer, deallocater: Deallocator) instead")
 	public init(bytesNoCopy bytes: UnsafeBufferPointer<UInt8>, deallocator: Deallocator = .free) {
+		let (q, b) = deallocator._deallocator
+		let d = bytes.baseAddress == nil ? _swift_dispatch_data_empty()
+					: dispatch_data_create(bytes.baseAddress!, bytes.count, q?.__wrapped, b)
+		self.init(data: d)
+	}
+
+	/// Initialize a `Data` without copying the bytes.
+	///
+	/// - parameter bytes: A pointer to the bytes.
+	/// - parameter count: The size of the bytes.
+	/// - parameter deallocator: Specifies the mechanism to free the indicated buffer.
+	public init(bytesNoCopy bytes: UnsafeRawBufferPointer, deallocator: Deallocator = .free) {
 		let (q, b) = deallocator._deallocator
 		let d = bytes.baseAddress == nil ? _swift_dispatch_data_empty()
 					: dispatch_data_create(bytes.baseAddress!, bytes.count, q?.__wrapped, b)

	/// - parameter pointer: A pointer to the buffer you wish to copy the bytes into.
	/// - parameter count: The number of bytes to copy.
	/// - warning: This method does not verify that the contents at pointer have enough space to hold `count` bytes.
	public func copyBytes(to pointer: UnsafeMutablePointer<UInt8>, count: Int) {
		_copyBytesHelper(to: pointer, from: 0..<count)
	}
		
	/// Copy a subset of the contents of the data to a pointer.

	/// - parameter pointer: A pointer to the buffer you wish to copy the bytes into.
	/// - parameter range: The range in the `Data` to copy.
	/// - warning: This method does not verify that the contents at pointer have enough space to hold the required number of bytes.
	@available(swift, deprecated: 4, message: "Use copyBytes(to: UnsafeMutableRawBufferPointer, from: CountableRange<Index>) instead")
	public func copyBytes(to pointer: UnsafeMutablePointer<UInt8>, from range: CountableRange<Index>) {
		_copyBytesHelper(to: pointer, from: range)
	}
	
	/// Copy a subset of the contents of the data to a pointer.
	///
	/// - parameter pointer: A pointer to the buffer you wish to copy the bytes into.
	/// - parameter range: The range in the `Data` to copy.
	/// - warning: This method does not verify that the contents at pointer have enough space to hold the required number of bytes.
	public func copyBytes(to pointer: UnsafeMutableRawBufferPointer, from range: CountableRange<Index>) {
		guard pointer.baseAddress != nil else { return }
		_copyBytesHelper(to: pointer.baseAddress!, from: range)
	}

	/// Copy the contents of the data into a buffer.
	///
	/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `MemoryLayout<DestinationType>.stride * buffer.count` then the first N bytes will be copied into the buffer.
