[][src]Function rle_decode_fast::rle_decode

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

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