# Pure ruby Zlib impl?

**URL:** <https://www.ruby-forum.com/t/pure-ruby-zlib-impl/96738>\
**Category:** Ruby\
**Created:** [January 24, 2006, 6:35pm UTC](https://www.ruby-forum.com/t/pure-ruby-zlib-impl/96738 "2006-01-24T18:35:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_O\_Nutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aeb1de/32.png) [@Charles\_O\_Nutter](https://www.ruby-forum.com/u/Charles_O_Nutter)\
**Post date:** [January 24, 2006, 6:35pm UTC](https://www.ruby-forum.com/t/pure-ruby-zlib-impl/96738/1 "2006-01-24T18:35:51Z")

</div>

We on the JRuby project have reached the point where rubygems runs up  
to where it would need Zlib to work. Since we obviously don’t have the  
native C zlib impl in JRuby, we don’t have Zlib available yet. Does  
anyone know of a pure Ruby impl of Zlib and related classes? Even if  
it’s bloody slow, it would give us somewhere to start.

- Charlie

---

<div class="post-metadata">

**Author:** ![Charles\_O\_Nutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aeb1de/32.png) [@Charles\_O\_Nutter](https://www.ruby-forum.com/u/Charles_O_Nutter)\
**Post date:** [January 24, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/pure-ruby-zlib-impl/96738/2 "2006-01-24T19:15:22Z")

</div>

On 1/24/06, Charles O Nutter [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> We on the JRuby project have reached the point where rubygems runs up  
> to where it would need Zlib to work. Since we obviously don’t have the  
> native C zlib impl in JRuby, we don’t have Zlib available yet. Does  
> anyone know of a pure Ruby impl of Zlib and related classes? Even if  
> it’s bloody slow, it would give us somewhere to start.

For a quick start, the “Zlib” implementation at java.util.zip package  
cannot be encapsulated so that it can be replaced later by a Ruby  
port? I don’t know if I am talking nonsense because I don’t know how  
much of Java SDK JRuby takes for granted.

Regards,  
Adriano.

---

<div class="post-metadata">

**Author:** ![Charles\_O\_Nutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aeb1de/32.png) [@Charles\_O\_Nutter](https://www.ruby-forum.com/u/Charles_O_Nutter)\
**Post date:** [January 24, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/pure-ruby-zlib-impl/96738/3 "2006-01-24T19:39:48Z")

</div>

Yes, we intend to eventually wrap Java’s zlib functionality, to allow  
for the best performance. The biggest piece we really need is the  
Ruby-facing library…the Zlib module and the classes, methods, and  
constants it contains. We’ve started roughing these out by hand with  
the intention of backing them using Java’s zlib support, but if there  
were any existing impl or simple way to generate stubbed code it would  
save us a lot of time.

- Charlie
