NET FTP Library
CompressFile Method
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : CompressFile Method
Compress a file using the specified compression type
Syntax
'Declaration
 
Public Sub CompressFile( _
   ByVal compressionType As CompressionType, _
   ByVal inputFilePath As System.String, _
   ByVal outputFilePath As System.String _
) 
'Usage
 
Dim instance As FTP
Dim compressionType As CompressionType
Dim inputFilePath As System.String
Dim outputFilePath As System.String
 
instance.CompressFile(compressionType, inputFilePath, outputFilePath)
public void CompressFile( 
   CompressionType compressionType,
   System.string inputFilePath,
   System.string outputFilePath
)
public procedure CompressFile( 
    compressionType: CompressionType;
    inputFilePath: System.String;
    outputFilePath: System.String
); 
public function CompressFile( 
   compressionType : CompressionType,
   inputFilePath : System.String,
   outputFilePath : System.String
);
public: void CompressFile( 
   CompressionType compressionType,
   System.string* inputFilePath,
   System.string* outputFilePath
) 
public:
void CompressFile( 
   CompressionType compressionType,
   System.String^ inputFilePath,
   System.String^ outputFilePath
) 

Parameters

compressionType
inputFilePath
outputFilePath
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
string inputFilePath = "c:\\bigfile.txt");
string outputFilePath = "c:\\compressed.txt");
ftp.CompressFile(KellermanSoftware.EncryptionLibrary.CompressionType.GZip, inputFilePath, outputFilePath);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
Dim inputFilePath As String = "c:\bigfile.txt")
Dim outputFilePath As String = "c:\compressed.txt")
ftp.CompressFile(KellermanSoftware.EncryptionLibrary.CompressionType.GZip, inputFilePath, outputFilePath)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members