Re: [mkgmap-dev] Commit r4836: Cut labels which are longer than 170 characters, but not the copyright message or labels from ExtTypeAttributes

2021-12-23 Thread Gerd Petermann
Hi all, I've checked a few old Garmin maps and it seems that Garmin often used 50 bytes as a max length for labels and obviously names are cut to that length, I see truncated names like "BIBLIOTHÈQUE MUNICIPALE ET INTERUNIVERSITAIRE DE C" or "CANAL D'IRRIGATION DE REMOULINS À FOURQUES OU LE C"

Re: [mkgmap-dev] [mkgmap-svn] Commit r572: MDR16 is some kind of codebook.

2021-12-23 Thread Gerd Petermann
Hi Ticker, reg. "stat": my rule is a bit different but the result is the same: for all odd values: depth = usedBits = stat >> 1; val is the 2nd byte. for even stat values and rows where stat == val << 1 the decoder has to read exactly 1 more bit to decide which character was encoded. I've not

Re: [mkgmap-dev] [mkgmap-svn] Commit r572: MDR16 is some kind of codebook.

2021-12-23 Thread Ticker Berkin
Hi Gerd Maybe the "is always 8" is the character width. I think I understand parts of it. Read 5 bits and look up, giving 2 bytes. if first 3/5/6/9/b the final char in the second byte and return (b- first)/2 to the bit stream. Otherwise the combination somehow indicate a minimum number of more

Re: [mkgmap-dev] [mkgmap-svn] Commit r572: MDR16 is some kind of codebook.

2021-12-23 Thread Gerd Petermann
Hi Ticker, ouch, didn't even read that one :( Would have saved me a lot of time as my first idea was a "jump table". Attached is the new patch and the corrected mdr16 outputs produced with this patch. So, besides the fields with ??? the only open question is the meaning of the struct bytes in

Re: [mkgmap-dev] [mkgmap-svn] Commit r572: MDR16 is some kind of codebook.

2021-12-23 Thread Ticker Berkin
Hi Gerd I guessed that it was the \0 that cut the file off. You mean something like answer 5 here: https://stackoverflow.com/questions/759707/efficient-way-of-storing-huffman-tree I looked at this earlier trying to work out if it was relevant but didn't make it fit - I should have tried