VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB.NET Examples

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

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

Byte Array
VB.NET FTPS
System.IO

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

 

 

 

 

 

 

Append to a Zip from a Byte Array

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

Demonstrates how to append to a .zip from a byte array.

        Dim zip As New Chilkat.Zip()
        zip.UnlockComponent("anything for 30-day trial")

        zip.NewZip("test.zip")

        ' Rather than appending a file using AppendFiles or AppendOneFileOrDir
        ' This example loads the file into a byte array, and then appends the byte
        ' array.
        Dim fInfo As New System.IO.FileInfo("fw9.pdf")
        Dim numBytes As Long = fInfo.Length
        Dim fStream As New System.IO.FileStream("fw9.pdf", System.IO.FileMode.Open, System.IO.FileAccess.Read)
        Dim br As New System.IO.BinaryReader(fStream)
        Dim data As Byte() = br.ReadBytes(CInt(numBytes))
        br.Close()
        fStream.Close()

        zip.AppendData("taxForm.pdf", data)

        zip.WriteZipAndClose()




 

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

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

Mail Component · XML Parser