¡@

Home 

2014/10/15 ¤U¤È 10:11:38

iphone Programming Glossary: myblob

Split NSData objects into other NSData objects with a given size

http://stackoverflow.com/questions/2899020/split-nsdata-objects-into-other-nsdata-objects-with-a-given-size

share improve this question The following piece of code does the fragmentation without copying the data NSData myBlob NSUInteger length myBlob length NSUInteger chunkSize 100 1024 NSUInteger offset 0 do NSUInteger thisChunkSize length offset.. question The following piece of code does the fragmentation without copying the data NSData myBlob NSUInteger length myBlob length NSUInteger chunkSize 100 1024 NSUInteger offset 0 do NSUInteger thisChunkSize length offset chunkSize chunkSize length.. NSUInteger thisChunkSize length offset chunkSize chunkSize length offset NSData chunk NSData dataWithBytesNoCopy char myBlob bytes offset length thisChunkSize freeWhenDone NO offset thisChunkSize do something with chunk while offset length Sidenote..