Just a wild guess: The NSData object has an overhead of 16 bytes and the 
(overloaded/member?) sizeof() function returns the NET contents, not the total 
size which should be 16 bytes (the overhead) longer.

-----Urspr?ngliche Nachricht-----
Von: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Rooney, 
Joe
Gesendet: Dienstag, 19. J?nner 2016 00:46
An: sqlite-users at mailinglists.sqlite.org
Betreff: [sqlite] Retrieved Blob Data has 16 Byte Header or ?

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?

_____________________________

Joseph Rooney
Mobile Development
Commscope, Inc.
Hickory, NC
828-315-2920 Ext: 52920

_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: hick at scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


Reply via email to