473,320 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Zipping multiple files.

Hi ,

I am getting byte[] of files (one at a time from server) and I want to zip all the files selected by user under one zip file. How can I do this. I tried java.util.ZipStream method but since it takes sbyte[] as input its causing damage to data and I am not able to open the file. Any other possible way.

Thank You.
Nov 7 '07 #1
6 1120
RedSon
5,000 Expert 4TB
You can try zipping after the file has been completely downloaded.
Nov 7 '07 #2
balabaster
797 Expert 512MB
You can try zipping after the file has been completely downloaded.
You could use some variation of a multi-dimensional array:

Byte()()....an array of byte arrays. Compress each byte array using the System.IO.Compression library. Send each byte array in sequence. It's probably the least complex solution to the puzzle...but it's not going to send them a zip of multiple files sadly.

If you want to get into complex (which will produce a standard zip containing multiple files), there are a number of libraries out there to do the job. But none of them compare with a simple reference to an existing .NET framework library sadly.

This is the spec for zip files if you want to go through the whole process:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Otherwise there's an open source library at which is released under GNU which means you can include it in any distributed software:
http://www.icsharpcode.net/OpenSourc...b/Default.aspx
Nov 7 '07 #3
You can try zipping after the file has been completely downloaded.
I also want to do same but what in case of multiple files and how?
Nov 8 '07 #4
You could use some variation of a multi-dimensional array:

Byte()()....an array of byte arrays. Compress each byte array using the System.IO.Compression library. Send each byte array in sequence. It's probably the least complex solution to the puzzle...but it's not going to send them a zip of multiple files sadly.

If you want to get into complex (which will produce a standard zip containing multiple files), there are a number of libraries out there to do the job. But none of them compare with a simple reference to an existing .NET framework library sadly.

This is the spec for zip files if you want to go through the whole process:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Otherwise there's an open source library at which is released under GNU which means you can include it in any distributed software:
http://www.icsharpcode.net/OpenSourc...b/Default.aspx


I tried it with SharpZipLib too but I am unable to open file. I am not getting how to do it.
Nov 8 '07 #5
RedSon
5,000 Expert 4TB
I tried it with SharpZipLib too but I am unable to open file. I am not getting how to do it.
Do they have any tutorials or sample code you can look at to see what to do?
Nov 8 '07 #6
Thanks.

Finally its working. I tried java.util.zip method and its working properly now.
Nov 12 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Beau | last post by:
Is there a native 'zipping' or compression compoonent in windows accessable via ASP? Or do you have to buy a compoonent?
0
by: Benjamin Bittner | last post by:
hallo ng, first of all, for the zipping progress i use the ziplib from http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx now to my problem. im trying to build a little application...
9
by: ReidarT | last post by:
How can I zip (compress) a file in vs2005 with windows own zip-program? reidarT
6
by: reidarT | last post by:
I will develop a backup routine with local files (zipped) to an internet server via ftp. How do I zip files in Vb.net? reidarT
1
by: durumdara | last post by:
Hi! As I experienced in the year 2006, the Python's zip module is not unicode-safe. With the hungarian filenames I got wrong result. I need to convert iso-8859-2 to cp852 chset to get good...
4
by: John | last post by:
Hi Is there a way in vb.net to zip files? Thanks Regards
0
by: Prateek G | last post by:
Hi , I am getting byte of files (one at a time from server) and I want to zip all the files selected by user under one zip file. How can I do this. I tried java.util.ZipStream method but...
2
by: karen.google | last post by:
I have an SSIS package that I'm converting from DTS (SQLServer 2005), and the ActiveX Script Task (in VBScript) is deprecated, so I'm trying to convert things to Script tasks (in VB .net). I...
2
by: Alien | last post by:
Hi, I am fairly new to PHP and wondering if there if PHP has any library that does zipping of files. Cheers.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.