minOutputBuffer top-level constant

int const minOutputBuffer

The smallest output buffer this port accepts for streaming (CORELIB_PLAN ยง5.1).

This port splits every atomic unit โ€” a field header, a fixlen_word, an element_count, a scalar or array-element varint, an fp32/fp64 element โ€” across a flush, so it reserves nothing contiguously and declares the floor the spec reserves for that case: 1. A one-byte streaming buffer produces output byte-identical to the one-shot path.

It binds a buffer installed with a flush sink, at construction and at every mid-stream installBuffer: such a buffer must satisfy buffer.length - offset >= minOutputBuffer and is rejected right there with SofabError.invalidArgument. A buffer installed without a sink (Encoder.overBuffer) is subject to no minimum โ€” no flush can occur, so no atomic unit can be split and the constant has nothing to say.

Implementation

const int minOutputBuffer = 1;