Is the Traffic counted as "MB" or "MiB"?

Hi there,

API shows me I got

<Download>30.62GB</Download>
<DownloadMB>31351</DownloadMB>

I was wondering if these “30.62GB” are
[list][]really 30.62GB, i.e. = 29.90GiB
[
]or they are 30.62GiB, so that 31,351 / 1024 = 30.62 makes sense. If so, there is another question, whether these “31351” are MB or MiB.[/list]

Thanks.

No funny business with MiBs or GiBs, otherwise it would have be named these…

Now I am a little confused.

Why does the API then show “30.62GB” and not “31.35GB” for these 31351 MB?

I put the question a different way:
These 31351 the API is reporting… are they 3135110001000 bytes or 3135110241024 bytes?

Network traffic is basically the same as storage - you move certain amounts of storage over the internet. Storage goes in 1024’s, not 1000’s.

31351 MB / 1024 = 30.62 GB

Ok, now it’s clear. Thx.

You don’t have to tell me how storage is calculated. I am a computer scientist :wink: The problem today is that industry doesn’t think that way. When I buy a HDD which says “3 TB” on the box and look what Windows shows for that drive… sadly I will notice I only bought “2,73 TB”. I know that these “TB” Windows reports in fact are TiB. An uptodate Linux uses the correct unit TiB.

So whenever I have to output data amount - storage or traffic - my efford is always to emphasize that I work with base 1024 by putting the KiB, MiB, … suffixes.

On the other hand when I see kB, MB, … suffixes I will always be confused because I don’t know whether base 1000 or 1024 is being used. - which led to this question here :smiley:

Windows uses a fair amount of space to create its “partition”. For every TB of HDD storage, Windows uses 86 GB of it to use as its “partition”. As far as the suffixes go:

KB, MB, GB, TB= base 1000.
KiB, MiB, GiB, TiB = base 1024.

I think that’s how it goes. You could always check Wikipedia for the exact wording.

MiB always means powers of 2

MB should always mean powers of 10, but some badly coded OSes or advertising puts it as power of 2.

Everytime power of 2 is used, put it in MiB/GiB et al for the sake of our sanity :slight_smile: