logo separator

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

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Dec 23 09:40:01 GMT 2021

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 the first table.
I guess it will become clear when I try to use the lookup table in the decoder.

Gerd


________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Donnerstag, 23. Dezember 2021 09:31
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev]       [mkgmap-svn]    Commit  r572:   MDR16   is      some    kind    of      codebook.

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 harder.

I still haven't spotted anything to determine the length of the 2 /3
byte in before and in the struct for {length}

Ticker

On Thu, 2021-12-23 at 01:17 +0000, Gerd Petermann wrote:
> Hi Ticker,
>
> sorry, just noticed that something went wrong with copy&paste because
> of the \0 character.
> Anyway, I think I understand the meaning of the part with the prefixes.
> I assume that Garmin reads the first 5 bits and uses this value as an
> index into a table
> which directly follows the first array. This 2nd table is a 32x2 lookup
> table, where the 2nd byte gives the value
> and the first byte some kind of status info which is used to position
> the bit reader.
> This would explain the repeating characters. Something like this:
>
> --------- MDR 16 (decompression codebook Huffman tree) ----------------
> ---------
> 000002b6 | 000000 | 4a                      | ???


_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdr-experimental-v2.patch
Type: application/octet-stream
Size: 24833 bytes
Desc: mdr-experimental-v2.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20211223/5b9fcba9/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: topo_hungary_mdr16.txt
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20211223/5b9fcba9/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: topo_fr_mdr16.txt
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20211223/5b9fcba9/attachment-0003.txt>


More information about the mkgmap-dev mailing list