title: Is NSData/Data storage contiguous?
body: <p>Are Data/NSData bytes guaranteed to be stored in contiguous memory?  Looking at the documentation (<a href="https://developer.apple.com/reference/foundation/data">https://developer.apple.com/reference/foundation/data</a>), I'm under the impression that one can access a contiguous representation of the bytes using <code>withUnsafeBytes()</code> or <code>withUnsafeMutableBytes()</code>.  However, it is possible that the bytes are copied from non-contiguous storage to a contiguous block when these methods are invoked.    </p>
  
  <p>I think it would be somewhat inefficient to copy the bytes when accessing them via those <code>withUnsafe...</code> methods, and the bytes are evidently stored contiguously when the <code>init(bytesNoCopy: ...)</code> initializer is used, so I tend to think that they are always stored contiguously, but haven't seen any docs stating so explicitly.  </p>