ScriptFUSION / ByteFormatter

:pencil2: Formats byte values as human-readable strings.
MIT License
40 stars 1 forks source link

B is the standard symbol for byte in all cases. SUFFIX_IEC = 'iB' isn't a thing #6

Open hikari-no-yume opened 8 years ago

hikari-no-yume commented 8 years ago

The IEC prefixes are Ki, Mi, Gi, etc. so the i belongs with the prefix, not the suffix.

As pointed out on reddit: https://www.reddit.com/r/PHP/comments/3yq3yx/byteformatter_is_a_psr2_compliant_library_that/cygfps8

Bilge commented 8 years ago

I'm not entirely sure what this means. Can you explain further?

hikari-no-yume commented 8 years ago

-iB isn't a suffix, the 'i' is part of the prefix. You wouldn't have 1000iB, you'd have 1000B.

Bilge commented 8 years ago

The term suffix is used here to mean the unit is suffixed to the value. i.e. the value is the prefix and the units are the suffix.

Bilge commented 8 years ago

The issue is with the distinction between prefix and suffix as defined in SymbolDecorator.