473,396 Members | 1,864 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,396 software developers and data experts.

Streaming ZIPPED files

Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries archive
site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced immediately,
and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a super-fast
zip service working in the background (which i think is unlikely), or b) you
can somehow 'stream' a zip file as it is created - which i think is the more
likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly
Nov 16 '05 #1
6 1665
Try looking at the #ziplib from #develop. It has a "xxxOutputStream"s (like
ZipOutputStream) that will write to a base stream instead of a file. This
way, you can start sending the stream immediately and still add files (or
even parts of files) as the client recieves it.

http://www.icsharpcode.net/OpenSourc...b/Default.aspx


"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote in
message news:uH**************@TK2MSFTNGP12.phx.gbl...
Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries archive
site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced immediately,
and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a super-fast
zip service working in the background (which i think is unlikely), or b) you can somehow 'stream' a zip file as it is created - which i think is the more likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly

Nov 16 '05 #2
Yes it is possible to create zip files on the fly, the actual implementation
will depend on which zip library you use, since .Net framework doesn't come
with one.

Jerry

"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote in
message news:uH**************@TK2MSFTNGP12.phx.gbl...
Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries archive
site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced immediately,
and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a super-fast
zip service working in the background (which i think is unlikely), or b) you can somehow 'stream' a zip file as it is created - which i think is the more likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly

Nov 16 '05 #3
Hi Jerry

I understand that its possible to create zip files on the fly, I'm wondering
how you start sending the zip to the client, before you've finished creating
it!

"Jerry Pisk" <je******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes it is possible to create zip files on the fly, the actual implementation will depend on which zip library you use, since .Net framework doesn't come with one.

Jerry

"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote in
message news:uH**************@TK2MSFTNGP12.phx.gbl...
Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries archive site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced immediately, and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a super-fast zip service working in the background (which i think is unlikely), or b)

you
can somehow 'stream' a zip file as it is created - which i think is the

more
likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly


Nov 16 '05 #4
Mark Kelly wrote:
Hi Jerry

I understand that its possible to create zip files on the fly, I'm wondering
how you start sending the zip to the client, before you've finished creating
it!
If you use the SharpZipLib library, you create a ZipOutputStream which
you wrap around an exisiting stream and then write to it using standard
StreamWriter classes.

As you write data to the ZipOutputStream, it's compressed on the fly and
sent to its eventual destination. In this way, you don't even have to
create a local file before sending it to the remote client!


"Jerry Pisk" <je******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes it is possible to create zip files on the fly, the actual


implementation
will depend on which zip library you use, since .Net framework doesn't


come
with one.

Jerry

"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote in
message news:uH**************@TK2MSFTNGP12.phx.gbl...
Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries
archive
site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced
immediately,
and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a
super-fast
zip service working in the background (which i think is unlikely), or b)


you
can somehow 'stream' a zip file as it is created - which i think is the


more
likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly



--

Ed Courtenay
[MCP, MCSD]
http://www.edcourtenay.co.uk
Nov 16 '05 #5
Cheers Ed - this is exactly what i was looking for.

"Ed Courtenay" <re*****************************@edcourtenay.co.uk > wrote in
message news:uD****************@TK2MSFTNGP12.phx.gbl...
Mark Kelly wrote:
Hi Jerry

I understand that its possible to create zip files on the fly, I'm wondering how you start sending the zip to the client, before you've finished creating it!


If you use the SharpZipLib library, you create a ZipOutputStream which
you wrap around an exisiting stream and then write to it using standard
StreamWriter classes.

As you write data to the ZipOutputStream, it's compressed on the fly and
sent to its eventual destination. In this way, you don't even have to
create a local file before sending it to the remote client!


"Jerry Pisk" <je******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes it is possible to create zip files on the fly, the actual


implementation
will depend on which zip library you use, since .Net framework doesn't


come
with one.

Jerry

"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote inmessage news:uH**************@TK2MSFTNGP12.phx.gbl...

Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries


archive
site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced


immediately,
and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a


super-fast
zip service working in the background (which i think is unlikely), or b)
you

can somehow 'stream' a zip file as it is created - which i think is the

more

likely option. I've noticed that none of the zips are compressed and waswondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I wouldreally appreciate it.

tia.

Mark Kelly


--

Ed Courtenay
[MCP, MCSD]
http://www.edcourtenay.co.uk

Nov 16 '05 #6
Cheers Philip - This is exactly what i was looking for.

"Philip Rieck" <st***@mckraken.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Try looking at the #ziplib from #develop. It has a "xxxOutputStream"s (like ZipOutputStream) that will write to a base stream instead of a file. This
way, you can start sending the stream immediately and still add files (or
even parts of files) as the client recieves it.

http://www.icsharpcode.net/OpenSourc...b/Default.aspx


"Mark Kelly" <mark.no$pam.kelly@f$nm.removemeandchange$tos.co.u k> wrote in
message news:uH**************@TK2MSFTNGP12.phx.gbl...
Hi (apologies for the xpost, but im not sure where this fits in),

I have recently had a site demostrated to me (a newsgroup binaries archive site) that allows a user to select multiple files, then download the
selected files combined as one zip. At first i thought this was nothing
special, until it was pointed out that the download commenced immediately, and some of the many selected files were almost a GB in size. The only
conclusions I can draw from this is that either a) they have a super-fast zip service working in the background (which i think is unlikely), or b)

you
can somehow 'stream' a zip file as it is created - which i think is the

more
likely option. I've noticed that none of the zips are compressed and was
wondering if its possible to somehow add a zip header to the response,
followed by binarywrites of the selected files?

If anybody can shed any light (point me in the direction of
articles/components/examples) on how to do this using c#/asp.net I would
really appreciate it.

tia.

Mark Kelly


Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Craig D | last post by:
I got really tired of unpacking a distutils package, installing then cleaning up. So I wrote distinstall.py - it reads a zip file, unpacks it, installs the bits and cleans up. I've only used it on...
10
by: Yogi_Bear_79 | last post by:
pardon my ignorance as I am a self-taught hobbyist programmer. I am curious after reading up on SharpZipLib. Can I embed a zipped txt file in my program? Then either read from within the zip...
6
by: Mark Kelly | last post by:
Hi (apologies for the xpost, but im not sure where this fits in), I have recently had a site demostrated to me (a newsgroup binaries archive site) that allows a user to select multiple files,...
3
by: A.M-SG | last post by:
Hi, I have a ASP.NET aspx file that needs to pass large images from a network storage to client browser. The requirement is that users cannot have access to the network share. The aspx file...
0
by: Amelyan | last post by:
I have a bunch of files I need to put into Compressed (zipped) Folder, MyFiles.zip file, similarly to what Windows XP does when you send files to compressed zipped folder, so users can download...
2
by: Cerebral Believer | last post by:
Hi All, I plan to use streaming audio on my site. I had uploaded some .mp3's as part of a trial, and these streamed very badly so I tried .ram (RealAudio) files instead. The RealAudio files...
8
by: poorna | last post by:
hi all i want to upload the video files to the server.. then i encode all the video files into flv files ... and then i am go to streaming ... in the mean while i create the thumbnail image...
8
by: Amjad | last post by:
Hi i am writing a application where i want to browse video file and copy data into stream and send that stream over network...I have develop P2P windows application where i successfully transfer...
3
by: Brad | last post by:
I have an aspx page that is sending pdf files to client browsers: it uses a filestream to read the pdf file and response.binarywrite to send content to the browser. This has worked great for years...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.