Skip to main content

run_length_encode

Function run_length_encode 

Source
pub fn run_length_encode<T: PartialEq + Clone>(v: &[T]) -> Vec<(T, usize)>
Expand description

Run-length encode a slice: consecutive equal elements become (value, count).