pub fn compress_data<T>(original_data: &[T]) -> (Vec<u32>, Vec<T>)
Expand description
This function compresses sequential repeated data in a vector. The compression result contains two vectors, one for the last indices of sequential repeated elements, and another for the repeated data. For example, [14, 14, 14, 27, 27] will be compressed to [2, 4], [14, 27].