def out.room
import bend-kit-zlib@0.5.1.0/zlib.bend as Zlibimport Base
128# The buffer doubles until k more bytes fit, so output is O(total), and it ends as the
129# fewest 2^dep words that hold n, as Bytes expects.
130def out.room(o: Out, +k: U32) -> Out:
131 Out{buf, +dep, +n} = o
132 +want = (n + k : U32)
133 out.grow(out.fits(dep, want), Out{buf, dep, n}, want)