I've a byte array and I save it in an NSData object. Now I need to change only some chunk of this NSData object at specified index and save it to file. What is the best way to achieve this without using malloc of new byte array?
Asked
Active
Viewed 133 times
0
-
1`NSMutableData` with `replaceBytesInRange:withBytes:length:`? – Larme Nov 20 '19 at 09:30
1 Answers
0
Did you try this?
https://developer.apple.com/documentation/foundation/nsdata/1410616-bytes?language=objc
However, obviously, this way is a little bit cumbersome. If the new data size is different, what will you do?

Cynichniy Bandera
- 5,991
- 2
- 29
- 33