logo separator

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

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue Dec 28 00:18:28 GMT 2021

Hi Gerd

So, in the first byte of each prefix table entry, the bottom bit =1
means push 0-n bits back, =0 means need to get extra bits to decode. In
both cases the value is >>1 and biased in a strange way. In most cases
variable numbers of bits will be needed, but the minimum is known.
Value of 0 means might need to get bits up to the max encoding length.

Have you come up with a meaning for the second byte of the prefixes
where it isn't a direct character.

I see what you mean about byte 4.

I don't follow what you mean about byte 6 and the length of the last
block.

Other static info that omight be encoded in bytes 0, 1 & 2 could be:
1/ version/subversion
2/ initial bits to read, giving size of prefix table (all 5 so far)
3/ includes refs to mdr29/30 &| 30/31. Which of your test maps have
these sections?

Ticker

On Sun, 2021-12-26 at 19:39 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> a few more patterns:
> byte 4 seems to relate to the highest stat value in the rows with
> even stat values.
> I see e.g 0x0f  and 0x1c or 0x0a and 0x1b. The formula: byte at 4 =
> highest /2 + 1
> 
> byte 6 (x) is related to the number of bytes (y) in the last block.
> (x = y * 2+ 1)
> I see e.g. 0x6b (107) and 53 bytes or 0x6d (109) with 54 bytes or
> 0x5d (93) and 46 bytes.
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Donnerstag, 23. Dezember 2021 20:53
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev]       [mkgmap-svn]    Commit  r572:  
> MDR16   is      some    kind    of      codebook.
> 
> 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 yet understood how the stat or the val field can be used to
> find the correct entry
> in the byte array with the characters.
> 
> So, maybe the stat value should be shifted to the right to make some
> sense.
> 
> 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 15:56
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev]       [mkgmap-svn]    Commit  r572:  
> MDR16   is      some    kind    of      codebook.
> 
> 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 bits to read and where to start searching.
> maybe the 'struct for level' 1 or 2 bytes is a bit flag of which
> levels
> to look in. I notice (in topo_fr) it is normally a single or adjacent
> bits except for 0xa, but there are no chars at level 19
> 
> prefix 0 doesn't quite follow the rules
> 
> Ticker




More information about the mkgmap-dev mailing list