A specification of elements in a list as a list of pairs giving the element and number of times it occurs in a run. For example, given the list , the run-length encoding is , , , , , , . Run-length encoding can be implemented in the Wolfram Language as:
RunLengthEncode[x_List] := {First[#], Length[#]}& /@ Split[x]