Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix size units #219

Merged
merged 1 commit into from
Mar 29, 2021
Merged

Fix size units #219

merged 1 commit into from
Mar 29, 2021

Conversation

MatthiasKunnen
Copy link
Contributor

@MatthiasKunnen MatthiasKunnen commented Mar 29, 2021

I've replaced the bytes packages with bytes-iec which uses the correct units.

I also went through the project and replaced usages of KB with kB where appropriate.

This fixes #218.

@ai
Copy link
Owner

ai commented Mar 29, 2021

Is it backward compatible? I am OK with limit changes because of the different unit, but will it work with 1 KB format (not 1 kB)?

@MatthiasKunnen
Copy link
Contributor Author

Yes, it is. Verify on this runkit: https://runkit.com/5f46c24ab29d17001ad6a0c2/60620658b40dfa001aa9e18b.

@ai ai merged commit a387867 into ai:main Mar 29, 2021
@ai
Copy link
Owner

ai commented Mar 29, 2021

WHat do you think of moving to KiB in docs?

@MatthiasKunnen
Copy link
Contributor Author

I would not do that. The base 10 notation is much easier to work with, i.e. convert between B <-> kB <-> MB. Linux and MacOS also display file size in base 10. Chrome network monitor also uses the base 10 notation.

@ai
Copy link
Owner

ai commented Mar 30, 2021

Released in 4.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Size reported incorrectly due to usage of factor 1024
2 participants