# Stream rubyzip

**URL:** <https://www.ruby-forum.com/t/stream-rubyzip/105439>\
**Category:** Rails\
**Created:** [May 30, 2007, 12:24am UTC](https://www.ruby-forum.com/t/stream-rubyzip/105439 "2007-05-30T00:24:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [May 30, 2007, 12:24am UTC](https://www.ruby-forum.com/t/stream-rubyzip/105439/1 "2007-05-30T00:24:56Z")

</div>

I have a Rails app that needs to create a Zip archive of a folder and  
send it to the client’s browser for download. I have no need for the Zip  
file on disk, so ideally, the Zip is created and streamed “on the fly”.

Is this possible?

If not, I’ll create a temp file and send that via xsendfile, but I’d  
rather avoid the extra (unnecessary) step if I could.

---

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [May 30, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/stream-rubyzip/105439/2 "2007-05-30T18:10:54Z")

</div>

I have a similar situation. I’ve been looking at the rubyzip library  
but it apparently does not support the compression of streams nor does  
it do in memory zipping. It seems to only work directly with files.

On May 29, 6:24 pm, Brian A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [September 20, 2009, 2:12pm UTC](https://www.ruby-forum.com/t/stream-rubyzip/105439/3 "2009-09-20T14:12:34Z")

</div>

I’d be interested to know if you got anywhere with this?
