rle2Encode

fnRle2Result rle2Encode(const(ubyte)[] mtfIndices, int nInUse) pure @safe

Encode MTF output using RLE2 (zero run encoding).

Zero runs are encoded using RUNA and RUNB in bijective base-2. Non-zero values are incremented by 1.

Parameters

mtfIndicesMTF transformed indices.
nInUseNumber of unique MTF symbols.

Returns

RLE2 encoded symbols with EOB marker at end.