Crate rle_decode_fast
source · [−]Expand description
rle-decode-helper
THE fastest way to implement any kind of decoding for Run Length Encoded data in Rust.
Writing a fast decoder that is also safe can be quite challenging, so this crate is here to save you the hassle of maintaining and testing your own implementation.
Usage
let mut decode_buffer = vec![0, 0, 1, 1, 0, 2, 3];
let lookbehind_length = 4;
let output_length = 10;
rle_decode_fast::rle_decode(&mut decode_buffer, lookbehind_length, output_length);
assert_eq!(decode_buffer, [0, 0, 1, 1, 0, 2, 3, 1, 0, 2, 3, 1, 0, 2, 3, 1, 0]);
Functions
Fast decoding of run length encoded data