Re: [NSMutableData resetDataRangeTo:(NSRange)range];
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- Subject: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- From: Carl Hoefs <email@hidden>
- Date: Tue, 15 Jul 2014 09:50:39 -0700
On Jul 15, 2014, at 1:45 AM, Mike Abdullah <email@hidden> wrote:
>
> Another possibility is to use dispatch_data. Rather than copy bytes around to assemble them into a contiguous buffer, your use case might be just as well suited to dispatch_data’s approach of tying together various non-contiguous buffers.
>
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.
-Carl
_______________________________________________
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