objective c - reading and separating file using byte comparison -


i have read file in .dat format , separate data based on 2 first consecutive 0 byte comes. first half json data , other half binary data.

how should go it?

i tried using nsdata datawithcontentsoffile method , read , convert in byte array , compare bytes. somehow, not working.

you can use same kind of procedure use read file lines. here , here earlier answers on regarding reading file line-by-line. change \n byte sequence applicable.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -