Function packagemerge::package_merge [] [src]

pub fn package_merge(
    frequencies: &[f64],
    max_len: u32
) -> Result<Vec<u32>, Error>

Given all symbol frequencies (or probabilities) and a limit on the maximum length of code words (up to 32), this function will apply the package merge algorithm to compute optimal code word lengths for the symbols so that the expected code word length is minimized.