KB / KiB possible issue

Just noticed when creating a release that GitHub reports my file of size 4684 bytes as 4.57KB…

A kilobyte (KB) is 1000 bytes.
A kibibyte (KiB) is 1024 bytes.

Therefore the UI should either show 4.68KB or 4.57KiB

Well, actualy 1 Kilobytes equals both 1000 and 1024 bytes.

That’s because you can use Kilobytes according to the Metric system (1kB = 1000 bytes) or to the JEDEC binary standard (1KB = 1024 bytes). GitHub and almost all tech related stuff will stick to JEDEC, which you can tell by looking at the abbreviation: Metric-based kilobytes are written as kB, and JEDEC-based are written as KB with a capital K.

So, to sum up, GitHub is correctly displaying the file sizes in KB (Kilobytes), according to JEDEC, since it’s using a capital K. Git CLI uses KiB to avoid such confusions.