Hello, Gerrit!

On Thu, 2007-11-01 at 14:00 +0100, Gerrit Sangel wrote:
> Am Donnerstag 01 November 2007 schrieb Thomas Perl:
> > Basically, you want to add support for the decimal output format of
> file
> > sizes. Why keep two different options for the same thing ("off" and
> > "binary"), apart from the added "i" in "MiB", "KiB" and "GiB".
> 
> Well, because I think some people would be confused if there is a “i”
> between the prefix and the unit. But I don’t know, personally I like
> the “MiB”  better than the wrong “MB”. I guess, MiB as standard usage
> would also be ok.

I've looked through the Wikipedia pages and through
http://physics.nist.gov/cuu/Units/binary.html, which described the
binary prefixes as part of the IEC 60027-2 standard. So, to do the Right
Thing(tm), we should use SI prefixes for 10^x and binary prefixes for
2^x, and remove the (wrong) default behaviour of gPodder.

> > I will have a look as time permits. Here are some questions that I'm
> > still not sure about:
> >
> >  -) What IS the standard of displaying file sizes? (KB[2], KB[10],
> KiB?)
> >  -) What is the benefit of providing "decimal" file sizes?
> >  -) It would modify the results of our speed/etc.. calculations, is
> >     that something we want or should avoid?
> 
> 1. As far as I know, there is no real standard. The SI prefixes (which
> are used in natural sciences) define a kilo as 10^3, a mega as 10^6, a
> giga as 10^9 and so on. That way, one can easily just cut the last
> digits of a file size and get a correct file size with a prefix (e.g.
> 194385745 byte = 194,39 MB) without using a calculator.
> Hard disk manufacturers also use them. That way, a 500 GB hdd has
> really 500 billion bytes. The problem now is that in the past, the
> kilo, mega and so on prefixes were used as 2^10, 2^20, 2^30 etc. But
> that’s incorrect, kilo etc. are defined as 10^3 etc. For this
> confusion to end, the binary prefixes were invented. That way, a kibi
> is 2^10. 
> 
> In short: kB for 1000 Bytes and KiB for 1024 Bytes are correct, but kB
> for 1024 Byte is incorrect. 
> 
> 2. Well, it is the correct usage of the SI prefixes. :D The problem is
> that the hdd manufacturers use the SI prefixes correctly (ok, they do
> that because they can advertise “more” space than there really is, but
> the thing is, they are correct whether the customer likes it or not).
> But almost all software products don’t use them correctly. That’s also
> a reason because I thought of an “off” setting. 
> I personally would really like to use the SI prefixes in my
> applications. If I have a MiB, I would still have to convert them to
> SI prefixes. I really don’t see the point why I should use another
> prefix just because it is a byte and not, say, a meter.
> 
> I guess, the main purpose of the binary prefixes is to clarify that
> kilo is only 1000, not 1024.

I think, gPodder's behaviour should be the following:

- default to SI prefixes (decimal, 1000 bytes = 1 kB)
- optional: binary prefixes; "1024 et al." (and display "KiB, MiB, ...")

Are there any objections?

That would change the values displayed (without changing the unit's
name), but as gPodder currently displays "wrong" values, I guess this is
okay. If people want the current calculation (binary), they can switch
to it in the config file and have KiB, MiB, etc.. displayed).

That would be the Right Thing(tm) when looking at standards. The changed
behaviour of gPodder is justified by the fact that currently gPodder
displays non-standard units/values.


Thomas
_______________________________________________
gpodder-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-devel

Reply via email to