Delphi Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Delphi Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
DH Key Exchange
DSA
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
NTLM
POP3
RSA
S/MIME
SMTP
Socket
Spider
SFTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Byte Array
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

Type Conversion

 

Article: Understanding COM References in Delphi

String-to-String Compression

Download Chilkat Crypt ActiveX

Loads a text file into a string and BZip2 compresses the string and encodes the output into a base64 string. The compression performance is similar to WinZip, but Base64 encoding of binary data will expand the compressed data by 4/3rds.

procedure TForm1.Button6Click(Sender: TObject);
var
  fileData: OleVariant;
  compressedString: WideString;
begin
    ChilkatCrypt21.UnlockComponent('test');
    fileData := ChilkatCrypt21.ReadFile('chilkat.xml');
    ChilkatCrypt21.EncodingMode := 'base64';
    // Compress the data (using the BZip2 algorithm) and encode the
    // compressed binary data into a base64 string.
    compressedString := ChilkatCrypt21.CompressBytesENC(fileData);
    Memo1.Text := compressedString;
end;

 

 

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · XML Parser