# Can rubyzip do password protected files?

**URL:** <https://www.ruby-forum.com/t/can-rubyzip-do-password-protected-files/56777>\
**Category:** Ruby\
**Created:** [April 3, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/can-rubyzip-do-password-protected-files/56777 "2006-04-03T21:46:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosSSSS\_Luis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@JosSSSS\_Luis](https://www.ruby-forum.com/u/JosSSSS_Luis)\
**Post date:** [April 3, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/can-rubyzip-do-password-protected-files/56777/1 "2006-04-03T21:46:02Z")

</div>

Hi.

I’ve been looking at the rubyzip docs and haven’t found anything  
concerning ziping/unziping password protected files.

Does rubyzip or any other lib have that capability?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![JosSSSS\_Luis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@JosSSSS\_Luis](https://www.ruby-forum.com/u/JosSSSS_Luis)\
**Post date:** [April 3, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/can-rubyzip-do-password-protected-files/56777/2 "2006-04-03T22:56:42Z")

</div>

I ran into this myself recently. Rubyzip is a wrapper around the zlib  
compression library.

Zlib itself doesn’t support password protected zips. There is another  
library made by the same folks that created zlib called Info-zip. It  
does support password protection but you’ll have to write your own to  
wrapper to make it a Ruby extension.

N.B. There’s a comment in the source for info-zip that implies that  
the password protection handling is hard to work with. I found that to  
be the case. In the end, I purchased a third party compression library  
(from ChilKat).

---

<div class="post-metadata">

**Author:** ![JosSSSS\_Luis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@JosSSSS\_Luis](https://www.ruby-forum.com/u/JosSSSS_Luis)\
**Post date:** [April 3, 2006, 11:09pm UTC](https://www.ruby-forum.com/t/can-rubyzip-do-password-protected-files/56777/3 "2006-04-03T23:09:11Z")

</div>

Thanks for the fast response.

removed\_email\_address@domain.invalid wrote:

> be the case. In the end, I purchased a third party compression library  
> (from ChilKat).

I had a feeling that would be the case.  
Thanks for the tip.
