Hello Forum !

SIMIN

Well-known member
Joined
Mar 10, 2008
Messages
92
Hello everyone here!
I hope I will enjoy using the forum!
OK my first post is a VB.NET request since I am confused at here.
I just found a code snippet in MSDN which convert an input file to an output (ZIP GZ) file.
It should be OK but I cannot figure it so it can accept multiple files as input and give me one single ZIP GZ output!
Maybe a pro can help me!
Code:
Dim SourceFile As FileStream = File.OpenRead(InPath)
Dim DestinationFile As FileStream = File.Create(OutPath)
Dim Buffer(SourceFile.Length) As Byte
SourceFile.Read(Buffer, 0, Buffer.Length)
Using Output As New GZipStream(DestinationFile, CompressionMode.Compress)
        Output.Write(Buffer, 0, Buffer.Length)
End Using
SourceFile.Close()
DestinationFile.Close()
 
Are you wanting to create a zip file from code? i.e. A typical zip archive containing multiple files each of which can be extracted individually or just concatenate multiple files into one large single compressed block?
 
I just want to add some files to a single output file for my personal use, I will use it for backup/restore of some of my application files!
 
Back
Top