rle1EncodeCalcSize

fnsize_t rle1EncodeCalcSize(const(ubyte)[] input) pure nothrow @nogc @safe

Calculate the size of RLE1 encoded output.

RLE1 limits runs of identical bytes to maximum 255. Runs of 4+ identical bytes are encoded as: 4 copies + count byte (0-251).

Parameters

inputInput data buffer.

Returns

Required output buffer size.