RunLengthEncoder Class

Definition

The RunLengthDecode encoder: runs of three or more equal bytes as repeats, everything else as literal runs, then the EOD byte 128.

public sealed class RunLengthEncoder : IStreamEncoder

Remarks

ISO 32000-2 §7.4.5: a length byte of 0 to 127 is followed by length + 1 bytes copied as they are; a length byte of 129 to 255 is followed by one byte repeated 257 - length times (2 to 128); 128 marks the end of the data. Runs longer than 128 bytes are split. A repeat of two bytes costs what a literal does, so only runs of three or more become repeats. Allocates nothing.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (1)

Methods (1)