Function WriteBuffer.opIndex
After calling it, set += to the length could be written.
ubyte[] opIndex() pure nothrow @property @nogc @safe;
buffer may return only part of the data. You may need to call it (and set += several times until length is 0). If all the data can be written, maximally 3 calls are required.
Returns
A chunk of data buffer.