[TYPO3-core] RFC #13645: Bug and Cleanup: t3lib_div::formatSize should use IEC prefixes and appropriate units
Sigfried Arnold
s.arnold at rebell.at
Thu Feb 25 12:48:12 CET 2010
Am 25.02.2010 11:42, schrieb Martin Kutschker:
> Weeell, that probably depends on how you see it. For me this is wrong, because I like the old
> traditional way that "abuses" SI prefixes. So I expect any byte value to use M but calculate with
> 1024. So for me the HD manufactures lie.
HDD manufacturers state the calculation base in every single datasheet -
so they don' lie, people just (can't|don't) read.
> The traditional way is to use SI but calculate with 1024.
Thats not true too :)
For example, 1.44 MB for a floppy disk has (formated) exaclty 1474560
bytes of capacity. So neither 1.44 MiB nor 1.44 MB (SI) is correct for
the capacity since the calculation was done with both bases - wich
leaded to confusion.
So a floppy disk got 1,40 MiB (IEC), 1,47 MB (SI) or 1,44 MB (traditional).
Another example: datarates were allways calculated in base 1000. So 10
MB/s is not equivalent to copy 10 MiB/MB (10485760 bytes) in one second
- its equivalent to copy 10000000 bytes in one second.
> As long as I can stick to that I'm fine with any change. *
Thats why i suggested option C, its very easy to expand the
configuration array of my patch by a new set of values - so everyone
could be satisfied.
> But I won't stop using TYPO3 if the majority here thinks that the IEC prefixes are the way to go
> (with any option to change it at all).
Option C with "traditional" calculation is an option too, won't change
anything for the enduser but still is more flexible and of course the
code is more scaleable.
More information about the TYPO3-team-core
mailing list