Don't randomly resize a buffer outside the managed scope
Don't randomly resize a buffer outside the managed scope

A GC might happen during a GVL unlock phase, so we can have issues here
with concurrent modification of these buffer.

Also there is no guarantee about the storage mechanism behind a string so we
can't just assume a data structure and muck with that.

rubysl/rubysl-zlib,rubysl/rubysl-zlib