Starting with version 6.5, 4D generates an error (-10600) if the BLOB passed to EXPAND BLOB is not compressed. When compressing a BLOB, the COMPRESS BLOB command places markers in the BLOB it compresses. These markers are to be recognized by EXPAND BLOB. If you attempt to expand a BLOB that has not been compressed by COMPRESS BLOB, EXPAND BLOB leaves the BLOB untouched, sets the OK variable to 0 and generates the error -10600. In order to avoid generating that error, you should test for the BLOB's status before expanding it.
For BLOBs whose size is below 254 bytes, COMPRESS BLOB leaves them untouched, sets OK to 0 and does not return an error.
To copy the code described above, select the text below:
BLOB PROPERTIES(MyBlob;$Compressed)
If ($Compressed)
EXPAND BLOB(MyBlob)
End if