<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/zlib/zlib.c, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Merge zlib-3.1.2</title>
<updated>2026-03-10T06:58:44+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-03-09T07:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=513ee91b3886724f8d73482c69a08f6ff7f03c3d'/>
<id>513ee91b3886724f8d73482c69a08f6ff7f03c3d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Bump up 3.1.1</title>
<updated>2024-05-29T18:35:46+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T18:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=541fc816fcb697307d666fed644ddd07ca5e942e'/>
<id>541fc816fcb697307d666fed644ddd07ca5e942e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 9f8f32bf9f3758ba67dd2afe7e07d9eccb68bbc7: [Backport #20289]</title>
<updated>2024-05-29T18:35:23+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T18:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ae6df6d03c6d9750be559641c4c9f3b39eac62d'/>
<id>2ae6df6d03c6d9750be559641c4c9f3b39eac62d</id>
<content type='text'>
	[ruby/zlib] In Zlib::GzipReader#eof? check if we're actually at eof

	Only consider it eof if we read ahead and something fills the buf.
	If not, we may only have empty blocks and the footer.

	Fixes https://github.com/ruby/zlib/pull/56

	https://github.com/ruby/zlib/commit/437bea8003
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[ruby/zlib] In Zlib::GzipReader#eof? check if we're actually at eof

	Only consider it eof if we read ahead and something fills the buf.
	If not, we may only have empty blocks and the footer.

	Fixes https://github.com/ruby/zlib/pull/56

	https://github.com/ruby/zlib/commit/437bea8003
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Bump up 3.1.0</title>
<updated>2023-11-07T08:50:40+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-11-07T08:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3d5fef77125a99458767c80347c01f383737efe7'/>
<id>3d5fef77125a99458767c80347c01f383737efe7</id>
<content type='text'>
https://github.com/ruby/zlib/commit/2561e122ac
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/zlib/commit/2561e122ac
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Fix misdetection of {crc32,alder32}_z in cloudflare zlib fork</title>
<updated>2023-10-26T02:17:54+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-10-15T22:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac4d687656b0350879ea2e033d2f13d1765a7ce3'/>
<id>ac4d687656b0350879ea2e033d2f13d1765a7ce3</id>
<content type='text'>
We use the Cloudflare fork of zlib
(https://github.com/cloudflare/zlib), which we find gives improved
performance on AWS Graviton ARM instances. That fork does not define
crc32_z and alder32_z functions.

Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib
_also_ did not define z_size_t, which meant Ruby did not try and use
these functions.

Since https://github.com/cloudflare/zlib/commit/a3ba99596d6271224d39ef9d6853511f51821e05
however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or
alder32_z). The zlib gem would try and use these nonexistant
functions and not compile.

This patch fixes it by actually specifically detecting the functions
that the gem wants to call, rather than just the presence of the
z_size_t type.

https://github.com/ruby/zlib/commit/c96e8b9a57
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We use the Cloudflare fork of zlib
(https://github.com/cloudflare/zlib), which we find gives improved
performance on AWS Graviton ARM instances. That fork does not define
crc32_z and alder32_z functions.

Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib
_also_ did not define z_size_t, which meant Ruby did not try and use
these functions.

Since https://github.com/cloudflare/zlib/commit/a3ba99596d6271224d39ef9d6853511f51821e05
however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or
alder32_z). The zlib gem would try and use these nonexistant
functions and not compile.

This patch fixes it by actually specifically detecting the functions
that the gem wants to call, rather than just the presence of the
z_size_t type.

https://github.com/ruby/zlib/commit/c96e8b9a57
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Zlib.gunzip should not fail with utf-8 strings</title>
<updated>2023-08-10T20:12:21+00:00</updated>
<author>
<name>Sorah Fukumori</name>
<email>sorah@cookpad.com</email>
</author>
<published>2023-08-10T20:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d2864ca330f7cc7f879e737a817e1161bead65c3'/>
<id>d2864ca330f7cc7f879e737a817e1161bead65c3</id>
<content type='text'>
(https://github.com/ruby/zlib/pull/55)

zstream_discard_input was encoding and character-aware when given input is user-provided, so this discards `len` chars instead of `len` bytes.

Also Zlib.gunzip explains in its rdoc that it is equivalent with the following code, but this doesn't fail for UTF-8 String.

```ruby
string = %w[1f8b0800c28000000003cb48cdc9c9070086a6103605000000].pack("H*").force_encoding('UTF-8')
sio = StringIO.new(string)
p gz.read #=&gt; "hello"
gz&amp;.close
p Zlib.gunzip(string) #=&gt; Zlib::DataError
```

Reported and discovered by eagletmt at https://twitter.com/eagletmt/status/1689692467929694209

https://github.com/ruby/zlib/commit/c5e58bc62a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/zlib/pull/55)

zstream_discard_input was encoding and character-aware when given input is user-provided, so this discards `len` chars instead of `len` bytes.

Also Zlib.gunzip explains in its rdoc that it is equivalent with the following code, but this doesn't fail for UTF-8 String.

```ruby
string = %w[1f8b0800c28000000003cb48cdc9c9070086a6103605000000].pack("H*").force_encoding('UTF-8')
sio = StringIO.new(string)
p gz.read #=&gt; "hello"
gz&amp;.close
p Zlib.gunzip(string) #=&gt; Zlib::DataError
```

Reported and discovered by eagletmt at https://twitter.com/eagletmt/status/1689692467929694209

https://github.com/ruby/zlib/commit/c5e58bc62a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Bump version to 3.0.0</title>
<updated>2022-12-05T08:26:21+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-05T08:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3f8dad0463e6d55f800dacb2ed55fa01182b2974'/>
<id>3f8dad0463e6d55f800dacb2ed55fa01182b2974</id>
<content type='text'>
https://github.com/ruby/zlib/commit/f1ce5e3e8d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/zlib/commit/f1ce5e3e8d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Use `z_size_t` version functions</title>
<updated>2022-04-02T10:34:05+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-02T10:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=07acd6006c69370c7af4ca50221f1a8166d78e3f'/>
<id>07acd6006c69370c7af4ca50221f1a8166d78e3f</id>
<content type='text'>
https://github.com/ruby/zlib/commit/1ce6625fff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/zlib/commit/1ce6625fff
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Mask checksums to lower 32bits on also IL32 platforms</title>
<updated>2022-04-02T10:23:59+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-02T10:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4ee71097a0557d01e5689c5edf52e508c6978571'/>
<id>4ee71097a0557d01e5689c5edf52e508c6978571</id>
<content type='text'>
https://github.com/ruby/zlib/commit/e1ead85113
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/zlib/commit/e1ead85113
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Mask checksums to lower 32bits</title>
<updated>2022-04-02T08:01:33+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-02T07:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1cbdedec895070df1df96d05370cf8da084ab6fa'/>
<id>1cbdedec895070df1df96d05370cf8da084ab6fa</id>
<content type='text'>
Upper bits affect the result of `crc32` in zlib 1.2.12.

https://github.com/ruby/zlib/commit/9ab6d04af1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upper bits affect the result of `crc32` in zlib 1.2.12.

https://github.com/ruby/zlib/commit/9ab6d04af1
</pre>
</div>
</content>
</entry>
</feed>
