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
Post a Comment