4D v17.4EXPAND BLOB | 
            ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                 
                
  | 
                
			
                    
                         
    4D v17.4
 
EXPAND BLOB 
                                
                                
        
 | 
                |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EXPAND BLOB ( blob ) | ||||||||
| Parameter | Type | Description | ||||||
| blob | BLOB | 
             
         | 
        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 ifThis 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 ifThe OK variable is set to 1 if the BLOB has been successfully expanded, otherwise it is set to 0.
	Product:  4D
	Theme:  BLOB
	Number:  
        535
        
        
        
	
	Modified:  4D v6.5.3 
Expansion, Compression
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v17)
	
	
	
	4D Language Reference ( 4D v17.1)
	
	4D Language Reference ( 4D v17.2)
	
	4D Language Reference ( 4D v17.3)
	4D Language Reference ( 4D v17.4)
Add a comment