@vyhymibavuropoto The best I can think of is
```
auto oldlen = buffer.length;
buffer.length = 0;
buffer.assumeSafeAppend();
buffer.length = oldlen * 2;
```