[libvoikko] can voikko for mac be smaller than zhfst

Harri Pitkänen hatapitk at iki.fi
Mon May 18 17:32:31 EEST 2015


On Sunday 17 May 2015 09:09:46 Jack Rueter wrote:
> This struck me as odd that the LO-voikko-4.0-mac.oxt could be smaller than
> the zhfst that it presummably contains.

This is a really interesting observation. I can confirm this with se speller:

se_LO-voikko-4.0-mac.oxt    16064401
se.zhfst (zip -9)           16131571
se.zhfst.zip (zip -9 twice) 14982562
se.zhfst (7z a -tzip -mx=9) 15514845

It appears that either the DEFLATE algorithm or the particular compressor are 
not very well suited for these files. You can win 7.1% by re-compressing the 
zhfst file again which explains why the oxt is smaller than the zhfst archive.

Using 7z instead of zip would save 3.8% and still produce a valid zhfst 
archive. It's a small win but the only downside is slower compression speed so 
perhaps it would be worth using that instead of zip -9 for spellers that are 
distributed to end users.

Harri


More information about the Libvoikko mailing list