labstack / gommon

Common packages for Go
MIT License
540 stars 101 forks source link

bytes package is not ISO/IEC 80000 and IEEE 1541 complient #28

Closed Kallinteris-Andreas closed 2 years ago

Kallinteris-Andreas commented 5 years ago

according to Clause 4 of the ISO/IEC 80000 standard and IEEE 1541 among other things, the SI prefixes strictly refer to powers of ten and should not be used to indicate binary multiples

instead the Ki,Mi,Gi,.. prefixes should be used to indicate power of 2s

more on: https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes

proposed solution: change the current units from Si prefixes to Binary prefixes (KB->KiB,MB->MiB,GB->GiB,..) and then (optionally) add support for Si units

vishr commented 5 years ago

@Kallinteris-Andreas I am open for a PR