Function ben::decode::decode_ben_line

source ·
pub fn decode_ben_line<R: Read>(
    reader: R,
    max_val_bits: u8,
    max_len_bits: u8,
    n_bytes: u32
) -> Result<Vec<(u16, u16)>>
Expand description

This is a helper function that is designed to read in a single ben encoded line and convert it to a regular run-length encoded assignment vector.

§Arguments

  • reader - A reader containing the ben encoded assignment vectors
  • max_val_bits - The maximum number of bits used to encode the value
  • max_len_bits - The maximum number of bits used to encode the length
  • n_bytes - The number of bytes used to encode the assignment vector

§Returns

A vector of tuples containing the run-length encoded assignment vector