Thank you so much for the superior size units!

Oh, how much I want every piece of software to use IEC binary units! I hate that in school, probably 100% of us learned that 1 KB is 1024 B, which is wrong (at least for a long time it was, if not from the beginning)! And the legacy of SI prefixes still lives on with many programs and OSes till this day. And in the modern time, these nasty prefixes can and do confuse a lot of people. The larger the amount of bytes, the more the difference between IEC unit and SI unit.

I think everyone knows that when you buy an external storage device that advertises, for example, 2 TB of storage, then many people get “angry” as they see in their file/disk manager that the amount of free space is actually about 1.86 “TB”. But there only thing that is incorrect is the unit which is being displayed. 2 TB is indeed about 1.86 TiB.

I’ve started a list of software that uses the correct units for measuring the size of digital stuff (files, links, directories; I also like to see download/upload speeds in Mebibyte/s, rather than Megabit/s). So far, I only wrote this:

  • git (rounds to 2 digits, with whitespace between value and unit)
  • syncthing .net (rounds to 1 digit, with whitespace between value and unit)
  • crates .io (rounds to 2 digits, with whitespace between value and unit)
  • nvim-tree.lua (rounds to 2 digits, with whitespace between value and unit)

(“Not to brag”, but I was responsible for the last two. :P)

Next on my watch list is Flathub and Flatpak.

So, by the size of this message, I hope you can understand how much I’m grateful for the fact that you are on this list. Thank you!

P.S. I’ve just started using it, and it is already so useful and free (in all meanings)!

1 Like

In the GUI, you can click on the speed unit to toggle between bits and bytes.

For sizes, the number of decimals is actually variable and depends on the size of the number, see this example:


Algorithm is here:

(Rule is: Show less fractions as numbers grow, until eventually no decimals are used at all)

Yeah, while searching for the existing post, I found a similar one, in which I discovered this little nifty thing.

Oh, ok. This makes sense. In nvim-tree.lua when the value is >= 1024 YiB, I omitted the digits after floating point. Not only they carry less useful information (the integer value by itself is already huge) but also to make Lua code cleaner, so I didn’t bother with the rounding.

1 Like