expandRunUint32

fnResult!(size_t, RleError) expandRunUint32(uint value, size_t count, return scope uint[] dst) @safe pure nothrow @nogc

Writes count copies of value into dst (bounded expansion).

Expansion is checked against the destination before writing; failure commits nothing.

Parameters

valuethe value to repeat.
countrepetition count (≥ 0).
dstcaller-provided output buffer.

Returns

Result!(size_t, RleError): values written (== count), or

INSUFFICIENT_CAPACITY with bytes == 0, values == 0 (the buffer is untouched — callers resume, they never repair).