Bytes.append: def of bend-kit-bytes@0.3.3.0 Import: import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes Lines 375-381 of bend-kit-bytes@0.3.3.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&start_line=375&end_line=381 import Base # a then b. b is written into a's buffer while it has room, and the buffer at least # doubles when it runs out, so building a buffer one piece at a time is O(total). def append(a: Bytes, b: Bytes) -> Bytes: Bytes{+la, ba} = a Bytes{+lb, bb} = b +n = (la + lb : U32) Bytes{n, dst(copy(lb, bb, grow(la, ba, n), 0, la))} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=copy https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=dst https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=grow