RunLengthEncodeExtension Class

RunLengthEncode extension.

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
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