decodeUint32

fnResult!(RleDecoded, RleError) decodeUint32(scope const(ubyte)[] src, ubyte widthBytes, return scope uint[] dst) @safe nothrow @nogc

Decodes a whole DDN-RLE/1 stream at element width W.

Per-token atomicity: a token either fully fits into dst or decoding stops before it with INSUFFICIENT_CAPACITY reporting the precise committed prefix (bytes = start of the incomplete token, values = values written — resume with a larger buffer from there). Zero-count headers and non-canonical varints are data errors (INVALID_TOKEN); short input or payloads are TRUNCATED (retryable, also reported from the token start).

Parameters

srcthe stream (consumed entirely on success).
widthByteselement width W (uint: 1/2/4).
dstcaller-provided output buffer.

Returns

Result!(RleDecoded, RleError): values written and bytes

consumed (equal to src.length on success).