Mutable bit-level output buffer for flat encoding. Bits are accumulated into currentByte (most-significant first) and flushed to buffer one byte at a time. The caller must pre-size bufferSize from Flat.bitSize — the buffer does not grow.
Attributes
Throws
IllegalArgumentException
if bufferSize is negative. A buffer that is merely too small is not detected here: the overrun surfaces as an ArrayIndexOutOfBoundsException while encoding, which means the Flat instance's bitSize under-estimates.