2 years later, same problem and it's still very hard for me either to found some info on this exact same problem : http://stackoverflow.com/questions/6388456/what-is-the-first-3-bytes-in-a-blob-column-sqli te-adobe-air
Did you finaly found a solution?
I did not find an answer to my question, but I did develop a kluge that works for my purposes:
I look for specific things in the string to indicate the start of the document in the blob.
1. I skip the first 4 characters.
2. I look for a hex-pair that begins with a 0 through 8. If I find such a pair, it is the last pair of the "prefix" and the document begins in the next hex-pair.
3. I look for a string of "3C3F786D6C". If I find that string, it is the start of the document.
#2 seemed to work for most, but not all blobs. The other blobs contained the string in #3.
Hi Steve, thank you for response.
Since my message I stubbornly continued to search and finaly found the solution.
I am not sure if your problem is the same. But I found that the added bytes to the blob were due to some AMF 3 formatting. I think Adobe AIR Sqlite provider let you store any object as a binary into a blob and when you try to store a ByteArray there some formatting applied to allow AIR to be able to convert it back into a ByteArray. (Which is the purpose of AMF but is not very wise for cross-compatibility and should obviously be more detailed in the docs!)
So the first byte will define the AMF TypeCode which is 12 for a ByteArray and then it will add a 29-bit integer for the byte-length followed by the raw bytes.
My complete solution is explained in my answer with the sources : http://stackoverflow.com/questions/6388456/what-is-the-first-bytes-in-a-blob-column-sqlite -adobe-air-blob-sizeinfo