RunLengthEncodeExtension Class

RunLengthEncode extension.

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.1.0+0e154ef592f33ce0f6f3d534a9eedee273f0ce72
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