4D v13.4

EXPAND BLOB

Home

 
4D v13.4
EXPAND BLOB

EXPAND BLOB 


 

EXPAND BLOB ( blob ) 
Parameter Type   Description
blob  BLOB in BLOB to expand

The EXPAND BLOB command expands the BLOB blob that was previously compressed using the COMPRESS BLOB command.

After the call, the OK variable is set to 1 if the BLOB has been expanded. If the expansion could not be performed, the OK variable is set to 0.

If the expansion could not be performed because of a lack of memory, no error is generated and the method resumes its execution.
In any other case (i.e. the BLOB has not been compressed or is damaged), the error -10600 is generated. This error can be trapped using the ON ERR CALL command.

To check if a BLOB has been compressed, use the BLOB PROPERTIES command.

This example tests if the BLOB vxMyBlob is compressed and, if so, expands it:

 BLOB PROPERTIES(vxMyBlob;$vlCompressed;$vlExpandedSize;$vlCurrentSize)
 If($vlCompressed#Is not compressed)
    EXPAND BLOB(vxMyBlob)
 End if

This example allows you to select a document and then expand it, if it is compressed:

 $vhDocRef :=Open document("")
 If(OK=1)
    CLOSE DOCUMENT($vhDocRef)
    DOCUMENT TO BLOB(Document;vxBlob)
    If(OK=1)
       BLOB PROPERTIES(vxBlob;$vlCompressed;$vlExpandedSize;$vlCurrentSize)
       If($vlCompressed#Is not compressed)
          EXPAND BLOB(vxBlob)
          If(OK=1)
             BLOB TO DOCUMENT(Document;vxBlob)
          End if
       End if
    End if
 End if

The OK variable is set to 1 if the BLOB has been successfully expanded, otherwise it is set to 0.

 
PROPERTIES 

Product: 4D
Theme: BLOB
Number: 535

The OK variable is changed by the command

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D v6.5.3

 
SEE ALSO 

BLOB PROPERTIES
COMPRESS BLOB

 
TAGS 

Expansion, Compression***