Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP 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

 

 

 

 

 

 

 

Zip Compress In-Memory Data into a Zip Archive

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)

This VB example shows how to create a Zip archive that contains "files" whose contents originate from in-memory data.

' Create a Zip compression archive containing entries
' that are compressed directly from memory.
Private Sub Command2_Click()
    
    ' Create a Chilkat Zip object
    Dim ZipFile As ChilkatZip2
    Set ZipFile = New ChilkatZip2
    
    ZipFile.UnlockComponent UnlockCode.Text
    
    ' Initialize the Zip object.  OutputZip.Text is a Text control
    ' containing the name of the Zip file that will be created.
    ZipFile.NewZip OutputZip.Text
    
    ' Add the data to the Zip object.
    Dim e As ChilkatZipEntry2
    Set e = ZipFile.AppendData("myData.txt", TextData.Text)
    
    If (e Is Nothing) Then
        MsgBox ZipFile.LastErrorText
        Exit Sub
    End If
          
    ' Compress and write to disk.
    success = ZipFile.WriteZipAndClose()
    If (success = 0) Then
        MsgBox ZipFile.LastErrorText
    Else
        MsgBox "Created Zip!"
    End If
    
    Set ZipFile = Nothing
    
    Exit Sub
    
End Sub

Private Sub Form_Load()
    OutputZip.Text = CurDir$ + "\memoryData.zip"
    
End Sub


 

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