logo separator

[mkgmap-dev] Idea: common string suffix elimination

From Marko Mäkelä marko.makela at iki.fi on Mon Apr 11 21:59:42 BST 2011

In the .img files, I see many strings that end in a common suffix. I 
wonder how hard it would be to maintain an index of string suffixes and 
point to an existing string instead of storing a new one.

For example, if there is a "INFORMAL STREET", the names "FORMAL STREET" 
and "AL STREET" could point into the string, provided that it is in the 
8-bit encoding (or, in the 6-bit encoding, but the encoded string suffix 
starts at a byte boundary).

To save processing time, we could do a "best effort" suffix compression.  
That is, if "FORMAL STREET" happens to be written before "INFORMAL 
STREET", then we would not be producing the optimal result.

In order to take full advantage of the suffix compression, I think that 
the display_name for major highways in the default style should lose the 
(${ref}) suffix.

Best regards,

	Marko



More information about the mkgmap-dev mailing list