Skip to main content

decode

Function decode 

Source
pub fn decode(input: &[u8]) -> Result<Vec<u8>, DecodeError>
Expand description

Decode run-length encoded data.

  • Length byte 0–127: copy the next length + 1 bytes literally.
  • Length byte 129–255: repeat the next byte 257 - length times.
  • Length byte 128: end of data (EOD).