def w.shrink
import bend-kit-json@0.7.0.0/json.bend as Jsonimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
55def w.shrink(fit: Bool, +n: U32, buf: Array<U32>) -> Array<U32>:
56 match fit:
57 case True{}:
58 buf
59 case False{}:
60 Bytes.dst(Bytes.copy(n, buf, Bytes.alloc(n), 0, 0))