Run a Builder with the given buffer sizes.
Use this function for integrating the Builder type with other libraries
that generate lazy bytestrings.
Note that the builders should guarantee that on average the desired chunk
size is attained. Builders may decide to start a new buffer and not
completely fill the existing buffer, if this is faster. However, they should
not spill too much of the buffer, if they cannot compensate for it.
FIXME: Note that the following paragraphs are not entirely correct as of
blaze-builder-0.4:
A call toLazyByteStringWith bufSize minBufSize firstBufSize will generate
a lazy bytestring according to the following strategy. First, we allocate
a buffer of size firstBufSize and start filling it. If it overflows, we
allocate a buffer of size minBufSize and copy the first buffer to it in
order to avoid generating a too small chunk. Finally, every next buffer will
be of size bufSize. This, slow startup strategy is required to achieve
good speed for short (<200 bytes) resulting bytestrings, as for them the
allocation cost is of a large buffer cannot be compensated. Moreover, this
strategy also allows us to avoid spilling too much memory for short
resulting bytestrings.
Note that setting firstBufSize >= minBufSize implies that the first buffer
is no longer copied but allocated and filled directly. Hence, setting
firstBufSize = bufSize means that all chunks will use an underlying buffer
of size bufSize. This is recommended, if you know that you always output
more than minBufSize bytes.