Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
Append to a Zip from a Byte ArrayDownload: Chilkat .NET Assemblies 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() |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.