pub fn rle_decode<T>(
    buffer: &mut Vec<T>,
    lookbehind_length: usize,
    fill_length: usize
) where
    T: Copy
Expand description

Fast decoding of run length encoded data

Takes the last lookbehind_length items of the buffer and repeatedly appends them until fill_length items have been copied.

Panics

  • lookbehind_length is 0
  • lookbehind_length >= buffer.len()
  • fill_length + buffer.len() would overflow