logo separator

[mkgmap-dev] [mkgmap-svn] Commit r4854: - fix possible error when negativ index was written to lookup table

From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Jan 10 08:44:31 GMT 2022

Hi Ticker,

thanks for reviewing, fixed the bug in MDR17.

I've not even started to optimize anything reg. performance. I'm still trying to
understand the idea of the shifted minCode values and I think I understand it
now after looking at the code in GPXSee (huffmantable.cpp method HuffmanTable::symbol)

I have a few sample MDR16 with unicode maps (from private mails). They all use 6 bits
for the lookup table.

"Does sizes.getStrOffSize() need fixing after the final forms of the
strings have been written?"
Maybe yes. I didn't recognize that nextOffset is used to calculate that.

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 09:22
An: mkgmap-dev at lists.mkgmap.org.uk; mkgmap-svn at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4854: - fix possible error when negativ index was written to lookup table

Hi Gerd

Just starting to read the new code more carefully and a few comments:

In Mdr17 the following line should be deleted:
        len = (len << 1) + 1;

Mdr15 is not written forDevice so can skip all the compression stuff.

Have you seen an example with unicode. There seem to be too many
assumption about fixed/8-bit charsets to attempt compression.

In Mdr15.createString, for compressed can just use ++nextOffset, the
string length is meaningless

Does sizes.getStrOffSize() need fixing after the final forms of the
strings have been written?

Will look at the nitty-gritty detail next.

Ticker

On Sun, 2022-01-09 at 11:03 +0000, svn commit wrote:
> Version mkgmap-r4854 was committed by gerd on Sun, 09 Jan 2022
> BRANCH: mdr2
> - fix possible error when negativ index was written to lookup table
> - rename initBits to lookupBits
> - use common code for variable length integers in MDR16 and Mdr17
> - simplify code, add comments
> to be continued...
>
>
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4854
> _______________________________________________
> mkgmap-svn mailing list
> To unsubscribe send an mail to mkgmap-svn-leave at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-svn


_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list