RunLengthEncodeExtension Class

RunLengthEncode extension.

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
C#
public static class RunLengthEncodeExtension
Inheritance
Object    RunLengthEncodeExtension

Methods

RunLengthEncodeT(IEnumerableT) Run-length encodes a sequence by converting consecutive instances of the same element into a KeyValuePair{T,int} representing the item and its occurrence count.
RunLengthEncodeT(IEnumerableT, IEqualityComparerT) Run-length encodes a sequence by converting consecutive instances of the same element into a KeyValuePair{T,int} representing the item and its occurrence count. This overload uses a custom equality comparer to identify equivalent items.

See Also