My requirement is to convert an NSData stream that is written in 2 formats: hex bytes and normal string data (not sure what is correct name for it but if you have a look you can know).
I am trying to find a way to fetch important stuff from it.
Here is a sample:
bbbbbb02bbbbbb
bbbbbb
From the above part, I can fetch 02 using approach shown here. (bbbbbb is simply a delimiter)
However I am not sure about the following part - and I don't know what should I do to convert it into something sensible. Best I know it is an ascii character bytes formatted as xml. (note bbbbbb delimiter at the end)
3c3f786d....long pattern of hex....bbbbbb
I have already gone through this but the utf-8-encoded nsdata to nsstring conversion seems to require entire nsdata while I have bytes due to fragments of data that I need.
Can anyone put a sensible and cumulative approach to convert the entire pattern into required format ie bbbbbb02bbbbbb into 02, 3c3f786d.... into ascii xml and so on?