0

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?

christian mini
  • 1,662
  • 20
  • 39

1 Answers1

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