Json.w.room: def of bend-kit-json@0.7.0.0 Import: import bend-kit-json@0.7.0.0/json.bend as Json Lines 34-40 of bend-kit-json@0.7.0.0/json.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-json@0.7.0.0/json.bend&start_line=34&end_line=40 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # The buffer doubles when word k does not fit. def w.room(grow: Bool, buf: Array, +k: U32) -> Array: match grow: case True{}: Bytes.grow((k * 4 : U32), buf, (k * 8 : U32)) case False{}: buf Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=grow