kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 54 forks source link

ZIM size advertized in library is in MB while users see a MiB value in many other places #1095

Closed benoit74 closed 1 week ago

benoit74 commented 2 weeks ago

For instance with https://library.kiwix.org/#q=stacks, library displays 149MB while all other speak about 143MB. It is confusing.

Library:

image

download.kiwix.org: image

Firefox download box: image

Chrome download box: image

Mirrorbrain meta information: https://download.kiwix.org/zim/zimit/stacks.math.columbia.edu_en_all_2024-06.zim?mirrorlist

image

MacOS Finder: image

It comes from the classical confusion between MiB and MB (see e.g. https://tecadmin.net/difference-between-megabyte-megabit-and-mebibyte/). While the value displayed is technically correct (we really have a 149MB file, 143MiB), everywhere else users have a MiB value displayed instead of MB. I think we should align with what looks mostly like a consensus (Apple is different ... as always ^^) and write 143MiB to be precise.

I also suggest we drop the precision to only 3 digits, everything else is just noise : 149Mib, 1.42GiB, ...

mgautierfr commented 2 weeks ago

Agree.

We are speaking about this code : https://github.com/kiwix/libkiwix/blob/main/static/skin/index.js#L81-L90

Should be easy to fix.

harsha-mangena commented 2 weeks ago

Hey @benoit74, @mgautierfr Can I pick this issue?