I quicky checked what std::map is. I haven't used it before.
If I understand it correctly it is quite similar to word compression. It scans you data to find all posible variations of posible data blocks, builds some kind of a dictionary which contains all posible data block variations and then finally replaces these datablocks with index numbers which represent the block variation saved in this "dictionary".
In word compression with using 16 bit integer number for dictionary Index this means that you can compress any word which is more than 3 characters long and ocurs athleast twice in the text.

I'm still puzled why you need ability of direct typecasting from String to Integer and vice versa.

Also if you might share how you store your map data I might provide you with an alternative solution for compressing map data.