Re: NSData Question... could be a bit odd
Re: NSData Question... could be a bit odd
- Subject: Re: NSData Question... could be a bit odd
- From: Jens Alfke <email@hidden>
- Date: Sat, 5 Jun 2010 19:11:32 -0700
On Jun 5, 2010, at 2:00 PM, Development wrote:
> What I need to do is have a backwards copy of the data in memory that I can quickly dump. The thing is I'm not entirely sure how I would go about getting the data in to a new object backwards. Any ideas?
Create a new NSMutableData of the same length.
Copy the data from src.bytes to dst.mutableBytes, a byte at a time in reverse order. It’s a simple C for() loop.
—Jens_______________________________________________
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