verifyLen = (encoder, len) => {
  const bufferLen = encoder.cbuf.length;

  if (bufferLen - encoder.cpos < len) {
    encoder.bufs.push(buffer.createUint8ArrayViewFromArrayBuffer(encoder.cbuf.buffer, 0, encoder.cpos));
    encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2);
    encoder.cpos = 0;
  }
}
Verify that it is possible to write `len` bytes wtihout checking. If
necessary, a new Buffer with the required length is attached.

@param {Encoder} encoder
@param {number} len