<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/zlib, 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] Support Ruby 2.5+ again</title>
<updated>2023-11-07T08:47:03+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-11-07T08:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79544157e44ccf833205fcdce0b0f1bd9796dd65'/>
<id>79544157e44ccf833205fcdce0b0f1bd9796dd65</id>
<content type='text'>
https://github.com/ruby/zlib/commit/661ea3ec5f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/zlib/commit/661ea3ec5f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/zlib] Check for z_size_t along with {crc,adler}32_z in</title>
<updated>2023-10-26T09:56:21+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>kj@kjtsanaktsidis.id.au</email>
</author>
<published>2023-10-26T09:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e74ea904ad29931c476b3af493e3ee089f5b4afa'/>
<id>e74ea904ad29931c476b3af493e3ee089f5b4afa</id>
<content type='text'>
extconf.rb
(https://github.com/ruby/zlib/pull/69)

The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor
z_size_t in its zlib.h header file. However, it _does_ have the crc32_z
and adler32_z symbols in the libz.a static library!

mkmf performs two tests for have_func:
* It sees if a program that includes the header and takes the address of
  the symbol can compile
* It sees if a program that defines the symbol as `extern void sym_name()`
  and calls it can be linked

If either test works, it considers the function present. The
android-ndk-r21e is passing the second test but not the first for
crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't
actually compile the extension (since the prototypes aren't in the
header file).

We can keep this working how it was working before by _also_ checking
for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks
in the header file for the type; if a program including the header file
and using the type can't compile, the type is considered absent
regardless of what might be in libz.a.

https://github.com/ruby/zlib/commit/3b9fe962d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
extconf.rb
(https://github.com/ruby/zlib/pull/69)

The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor
z_size_t in its zlib.h header file. However, it _does_ have the crc32_z
and adler32_z symbols in the libz.a static library!

mkmf performs two tests for have_func:
* It sees if a program that includes the header and takes the address of
  the symbol can compile
* It sees if a program that defines the symbol as `extern void sym_name()`
  and calls it can be linked

If either test works, it considers the function present. The
android-ndk-r21e is passing the second test but not the first for
crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't
actually compile the extension (since the prototypes aren't in the
header file).

We can keep this working how it was working before by _also_ checking
for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks
in the header file for the type; if a program including the header file
and using the type can't compile, the type is considered absent
regardless of what might be in libz.a.

https://github.com/ruby/zlib/commit/3b9fe962d8
</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>Update the depend files</title>
<updated>2023-02-28T17:09:00+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-02-13T14:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5e4b80177ef7e6abbe90849037b688c004568170'/>
<id>5e4b80177ef7e6abbe90849037b688c004568170</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove intern/gc.h from Make deps</title>
<updated>2023-02-27T18:11:56+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-02-16T22:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f38c6552f9f27169fbf4c0f3c25d34b8c2c28c9b'/>
<id>f38c6552f9f27169fbf4c0f3c25d34b8c2c28c9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
