Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
String-to-String Compression
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.