On 1/18/16, Rooney, Joe <Joseph.Rooney at commscope.com> wrote:
> The process, working in iOS:
>
>
> *         Retrieve an employee photo using web service call, encoded in
> Base64 string
>
> *         Convert Base64 string to NSData object - 3245 bytes
>
> *         Store NSData object to a Blob in SQLite - 3245 bytes
>
> *         Retrieve Blob to NSData object - 3245 bytes
>
> *         The retrieved data will not display.
>
> *         In comparing the hex input and retrieved output, I find there are
> 16 bytes added to the head of the data and I'm 16 bytes short.
>
> *         If I add the 16 bytes to the total when storing the data and then
> read back 3245 bytes at the location ptr + 16 bytes, I've got my proper
> data, which displays as normal.
>
> Anyone have any insights into this?

I suspect something is wrong with your application, or perhaps with
the wrapper you are using to access SQLite (assuming you are not
accessing SQLite directly).  It is difficult to say exactly what might
be wrong without seeing more information.

SQLite has never been known to shift BLOB content by 16 bytes before.

-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to