NSData object
NSData object
- Subject: NSData object
- From: "Peter Karlsson" <email@hidden>
- Date: Fri, 11 Apr 2003 07:28:46 +0000
Dear list!
I have a NSData object like this:
// code snippet
NSData *myData = [NSData dataWithContentsOfFile:thePath];
Now I want to read 2 bytes from this object (from offset 5 and 6). These 2
bytes are in a nybble-ized format like this:
0000llll (offset 5 from start of myData object)
hhhh0000 (offset 6 from start of myData object)
l = low nybble, h = high nybble
So I end up here with 1 byte of data. I want to copy that byte to another
NSData object at offset 0, lets call that object myData2.
Can someone help me with this code please?
Peter
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.