Visual Basic Examples

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

VB Examples

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

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

GZip and .Z Compress from Memory

Download Chilkat 32-bit Zip ActiveX (.msi) (includes objects for .zip, .gz, .bz2, and .Z)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Visual Basic example to create .Z and .gz files from the contents of a string variable.

    ' Create .gz and .Z files from in-memory data.
    
    ' First, create a big string to be compressed.
    s = ""
    For i = 0 To 100
        s = s + "Hello World!" + vbCrLf
    Next
    
    ' Create a .Z Unix compress file.
    Dim z As New UnixCompress
    z.UnlockComponent "anything for 30-day trial"
    z.CompressStringToFile s, "windows-1252", "helloWorld.txt.Z"
    
    ' Create a .gz GZip file.
    Dim gzip As New gzip
    gzip.UnlockComponent "anything for 30-day trial"
    gzip.CompressStringToFile s, "windows-1252", "helloWorld.txt.gz"
    
    ' Compress in-memory binary data to .gz and .Z files.
    Dim wordDocument As Variant
    wordDocument = gzip.ReadFile("faxCover.doc")
    
    gzip.CompressMemToFile wordDocument, "faxCover.doc.gz"
    z.CompressMemToFile wordDocument, "faxCover.doc.Z"
    

 

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