airlift / units

Java library for immutable human-friendly units

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataSize is using base of 1024 but decimal unit prefixes

nineinchnick opened this issue · comments

The DataSize type is using the base of 1024 but decimal unit prefixes. It should be using the base of 1000 and additionally parsing IEC prefixes with base 1024, such as KiB, MiB etc.

Unfortunately, this has been baked into our software too long at this time to change this. The library was purposely build ~12 years ago to handle base 2 data sizes, and use the convention at the time.