Skip to content

Conversation

@jeremyevans
Copy link
Contributor

This reads from the IO in 8192 byte chunks, so you don't need to
have the entire string in memory.

Fixes #16

This reads from the IO in 8192 byte chunks, so you don't need to
have the entire string in memory.

Fixes ruby#16
@jeremyevans jeremyevans requested a review from nurse October 27, 2020 21:22
Copy link
Member

@nurse nurse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. You can merge this after a tiny fix

ext/zlib/zlib.c Outdated
else if (rb_obj_is_kind_of(str, rb_cIO)) {
VALUE buf;
VALUE buflen = INT2NUM(8192);
ID meth = rb_intern("read");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id_read is defined in this file; use it.

@jeremyevans jeremyevans merged commit ba9793c into ruby:master Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: crc32 & al to accept IO instances

2 participants