Re: [NSMutableData resetDataRangeTo:(NSRange)range];
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- Subject: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- From: Kyle Sluder <email@hidden>
- Date: Tue, 15 Jul 2014 10:34:12 -0700
On Jul 15, 2014, at 10:20 AM, Jens Alfke <email@hidden> wrote:
>
>
>> On Jul 15, 2014, at 9:50 AM, Carl Hoefs <email@hidden> wrote:
>>
>> Awesome! I had been wondering if this concept existed in Cocoa, didn't see it in the NSData docs. It's sort of like using iovec structs with readv/writev for sockets. I would primarily use the dispatch_data_create_map() function, right? Looks like it's supported in OS X 10.7+. Très cool.
>
> I’ve seen evidence that NSData/CFData supports data objects built out of multiple non-contiguous buffers, because I’ve received some such objects in an NSURLConnection delegate callback. There just doesn’t appear to be any public API for _creating_ such an NSData object, sadly.
If you look closely, you’ll see those are dispatch_data_t’s, which are toll-free bridged to NSData.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden