Generalize TrieMap compression to GenMap.