The Pure Team is pleased to announce the release of pr-zlib 1.0.0.
= What is it?
The pr-zlib library is actually two separate libraries packaged
The first, rbzlib.rb, is a pure Ruby port of zlib.h (the C library).
module that you can mixin and use as you see fit. The second, zlib.rb,
pure Ruby version of the Ruby interface to the zlib C library that ships
part of the Ruby standard library.
= How do I get it?
gem install pr-zlib
Or, just go the RubyForge project page at
http://www.rubyforge.org/projects/pure, download the source and run
‘rake install’ or ‘rake install_as_zlib’ (which will install the library
‘zlib’ instead of ‘pr/zlib’).
= How do I use it?
The rest is the same as the zlib that ships with the Ruby stdlib.
= Why? (Also in the README)
First, building the zlib C library on MS Windows with Visual C++ is very
difficult. However, certain libraries depend on zlib, most notably
By providing a pure Ruby version we eliminate any compiler or platform
Second, even some Unix distributions, such as Debian, do not ship with
zlib library by default. By creating a pure Ruby version of the zlib
we eliminate the need to install a 3rd party C library, and eliminate a
potential weak link in the dependency chain.
Third, by creating pure Ruby versions of the library and the interface
are more likely to receive patches, feature requests, documentation
etc, from the Ruby community (I hope) since not everyone who knows Ruby
Last, the zlib interface that ships as part of the stdlib is a little on
clunky side IMO. By providing a pure Ruby version, authors can create
own interface as they see fit.
= What about Zliby?
Two things. First, Michael has not released the version of the code that
supports Zlib::GzipWriter. Second, Zliby merges the code into a single
The pr-zlib splits the code into its two parts - rbzlib.rb and zlib.rb.
former is a module that can be used separately. As I mentioned earlier,
means users can create their own interface if they prefer.
= Feeling Generous?
If you think this is a useful library, and would like to see more time
on others like it, please consider a contribution:
http://pledgie.com/campaigns/4706 (Daniel’s general drive)
[email protected] (Heesob on Paypal)
The Pure Team (Daniel B. and Park H.)