• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSMutableData resetDataRangeTo:(NSRange)range];


  • Subject: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • From: Carl Hoefs <email@hidden>
  • Date: Mon, 14 Jul 2014 12:15:04 -0700

On Jul 14, 2014, at 11:54 AM, Jens Alfke <email@hidden> wrote:

>
> On Jul 14, 2014, at 11:48 AM, Carl Hoefs <email@hidden> wrote:
>
>> Yes, I guess it's the semantics that threw me. I was attempting to "insertBytesInRange" not "replaceBytesInRange", so I had it in my mind that the one couldn't do the other. But that's the whole purpose of the NSRange. Very cool.
>
> The equivalent function in the ‘classic’ Mac OS had the very appropriate name of Munger( ) since it would munge bytes around in a heap block. Knowing how to use Munger was a sign of geek cred in the old (80s-90s) Mac dev community.
>
> ( http://www.mactech.com/articles/mactech/Vol.12/12.05/Handles2/index.html )
>
> —Jens

Okay, 1 last question on this. Is there a way to promote-in-place an NSData object into an NSMutableData object?  -becomeMutable or some such? I'm trying to avoid copying megabytes of data/sec if it's avoidable.


-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


  • Follow-Ups:
    • Re: [NSMutableData resetDataRangeTo:(NSRange)range];
      • From: "Gary L. Wade" <email@hidden>
    • Re: [NSMutableData resetDataRangeTo:(NSRange)range];
      • From: Jens Alfke <email@hidden>
References: 
 >[NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Matt Gough <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Mike Abdullah <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Ben Kennedy <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Next by Date: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Previous by thread: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Next by thread: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Index(es):
    • Date
    • Thread