14.2 Compress method

Compresses the source file and writes the compressed file into the destination file.

14.2.1 Syntax

object.Compress( 
   SourceFile As String, 
   DestinationFile As String)

14.2.2 Parameters

SourceFile

The name of the file to be compressed.

DestinationFile

The name of the output file.

14.2.3 Return Values

Boolean. Returns TRUE if successful, otherwise, FALSE.

14.2.4 Example

This example compresses server.bas and writes it into ion.bas.

Set Zip=CreateObject("UCX:ZipFile") 
print Zip.Compress("server.bas","ion.bas") 
If(err.Number<>0) then 
     print(err.Description) 
Endif 
print Zip.Decompress("ion.bas", "ori.bas") 
if(err.Number<>0) then 
     print(err.Description) 
endif

14.2.5 See Also