fn invert_encoding_map(encoding_map: &HashMap<u8, String>) -> HashMap<String, u8>{
    let mut inverted_encoding_map: HashMap<String, u8> = HashMap::new();

    for (key,value) in encoding_map {
        inverted_encoding_map.insert(value.to_owned(),*key);
    }
    return inverted_encoding_map;
}
//Inverts Keys and values for a given Encoding Map
Inverts Keys and values for a given Encoding Map
Inverts Keys and values for a given Encoding Map
fn invert_encoding_map(encoding_map: &HashMap<u8, String>) -> HashMap<String, u8>{
    let mut inverted_encoding_map: HashMap<String, u8> = HashMap::new();
    for (key,value) in encoding_map {
        inverted_encoding_map.insert(value.to_owned(),*key);
    }
    return inverted_encoding_map;
}
fn invert_encoding_map ( encoding_map : & HashMap < u8 , String > ) -> HashMap < String , u8 > { let mut inverted_encoding_map : HashMap < String , u8 > = HashMap :: new ( ) ; for ( key , value ) in encoding_map { inverted_encoding_map . insert ( value . to_owned ( ) , * key ) ; } return inverted_encoding_map ; }
Inverts Keys and values for a given Encoding Map
Inverts Keys and values for a given Encoding Map
encoding_map
&HashMap<u8, String>
encoding_map
&HashMap<u8, String>