Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor


VB Strings
VB Byte Array

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

GZip and .Z Uncompress to Memory

Download Chilkat Zip ActiveX

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

    ' Uncompress a .Z file directly into a string.
    Dim z As New UnixCompress
    z.UnlockComponent "anything for 30-day trial"
    myText = z.UncompressFileToString("helloWorld.txt.Z", "windows-1252")
    MsgBox myText
    
    ' Un-GZip a .gz file directly into memory.
    Dim gzip As New gzip
    gzip.UnlockComponent "anything for 30-day trial"
    myText = gzip.UncompressFileToString("helloWorld.txt.gz", "windows-1252")
    MsgBox myText
    
    ' Uncompress a binary file (MS-Word document) to a Variant
    Dim wordDocument As Variant
    wordDocument = z.UncompressFileToMem("faxCover.doc.Z")
    z.WriteFile "faxCover.doc", wordDocument
    ' We could have simply done this:
    z.UncompressFile "faxCover.doc.Z", "faxCover2.doc"
    
    wordDocument = gzip.UncompressFileToMem("faxCover.doc.gz")
    gzip.WriteFile "faxCover.doc", wordDocument
    ' We could have simply done this:
    gzip.UncompressFile "faxCover.doc.gz", "faxCover2.doc"
    

 

Need a specific example? Send a request to support@chilkatsoft.com

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