rubygems/rubygems — pull request #244 by nahi (2011-12-20 06:34:59+00:00)
Title: Remove Zlib workaround for Windows build.

Use GzipReader for creating inflated stream from data.tar.gz.

Here's the beginning of the long story.
http://osdir.com/ml/lang.ruby.gems.devel/2007-06/msg00045.html

StringIO wraping has never worked as a workaround by definition.
Skipping initial 10 bytes and passing -MAX_WBITS to Zlib::Inflate
luckily works as gzip reader, but it only works if the GZip header is 10
bytes long (see below) and it does not check inflated stream consistency
(CRC value in the Gzip trailer.)

RubyGems generated Gzip Header: 10 bytes
magic(2) + method(1) + flag(1) + mtime(4) + exflag(1) + os(1) +
orig_name(0) + comment(0)

Ideally, it must return a GZipReader without meaningless buffering. We
have lots of CRuby committers around so let's fix windows build when we
received an error.