[mkgmap-dev] [mkgmap-svn] Commit r4854: - fix possible error when negativ index was written to lookup table
From Ticker Berkin rwb-mkgmap at jagit.co.uk on Mon Jan 10 21:53:40 GMT 2022
Hi Gerd I think I got table1 / table2 names the wrong way round. The bit about "should it need" is probably necessary when all the levels fit into the prefix table but it isn't full. I won't look at it again until you want me to. Ticker On Mon, 2022-01-10 at 19:16 +0000, Gerd Petermann wrote: > Hi Ticker, > > table1 size depends on the number of levels with values and the > existence of the lookup table, empty levels are not stored. > When there is a lookup table (table2) we must not store the > corresponding top 5 /6 levels in table1. > > I don't understand the part after "Should it need ..." . It worked in > my tests but of course I might have missed a special case. > It's all work in progress. I plan to add unit tests, something like > "given these frequencies and codepage xyz the result should look like > ...". > > I plan to recode MdrDisplay now that I undestand almost all data. > I also want to implement this in MdrCheck during the next days. > > Gerd > > > ________________________________________ > Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag > von Ticker Berkin <rwb-mkgmap at jagit.co.uk> > Gesendet: Montag, 10. Januar 2022 17:49 > An: Development list for mkgmap > Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4854: - fix possible > error when negativ index was written to lookup table > > Hi Gerd > > More minor stuff - Still haven't understood the mincode parts > > mdr/Mdr16.java: > > loopupBits/lookupBits is very confusing. > Can you have lookupBits for table2 size and something else for table1 > size > > If maxDepth < initial size (5 or 6), can't you just set table1 size > to > maxDepth and set table2 size to 0. Or did you find this combination > didn't work. > > Should it need: > while (pos >= 0) { > tab2[pos * 2] = 0; > tab2[pos * 2 + 1] = (byte) lastIndex; > pos--; > } > Won't the data have been exhausted, with v0 being the first index of > table1 (0) and v2 correct > > MdrDisplay: > would be clearer to spot/remember the bottom bit flag in table2, and > > > 1 the data in both cases, then present the char data as > > > numBits/char > and the non-char data as minLev/maxLev > > Ticker > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
- Previous message: [mkgmap-dev] [mkgmap-svn] Commit r4854: - fix possible error when negativ index was written to lookup table
- Next message: [mkgmap-dev] LBL file encoding - Huffman
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list