473,830 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1676
Try looking at the #ziplib from #develop. It has a "xxxOutputStrea m"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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote in
message news:uH******** ******@TK2MSFTN GP12.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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote in
message news:uH******** ******@TK2MSFTN GP12.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******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote in
message news:uH******** ******@TK2MSFTN GP12.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******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote in
message news:uH******** ******@TK2MSFTN GP12.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
conclusion s 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******** ********@TK2MSF TNGP12.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******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote inmessage news:uH******** ******@TK2MSFTN GP12.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
conclusion s 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******** ********@TK2MSF TNGP11.phx.gbl. ..
Try looking at the #ziplib from #develop. It has a "xxxOutputStrea m"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.ke lly@f$nm.remove meandchange$tos .co.uk> wrote in
message news:uH******** ******@TK2MSFTN GP12.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
1449
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 windows and Linux and for pure Python packages. Windows: distinstall.py Photronics.zip Linux: python distinstall.py Photronics.zip Hopefully somebody else will find it useful. #======================== distinstall.py =====================
10
4525
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 file or unzip and read it? I currently have an embedded text file that contains a list that is read into an array. I'm always looking to save space. And I could reduce my file size 75% if it was zipped! I have looked at the SharpZipLib web site,...
6
1259
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, 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...
3
2345
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 must be the only method that users receive image files.
0
1102
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 MyFiles.zip from my ASP.NET 2.0 site. What is the simplest way to compress these files into a .zip? I found System.IO.Compression, but I am not sure how to use it to do what I need to do. Does anyone have an example of how to send a bunch of...
2
1958
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 are a lot smaller in size, but they do not stream, a user has to download the file before listening to it. Which format would you recommend for good to high quality audio streaming? Should RealAudio files stream? If so how can I get them to...
8
7679
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 from video.. doubts: how to upload the video files to web server?
8
65843
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 text message to each other but now i want to send video file and play that file on other end...I know the code how to send the stream over the network but basic problem is how open that file as a stream. Thanks
3
4048
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 in IE, Firefox and Opera on windows, and it works on a Mac with Firefox and Opera. But this fails in Safari with the generic message "A network error occurred while accessing this document". Here is a link to try out ...
0
9778
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9640
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10520
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10196
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6940
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.