You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unit measurements shouldn't convert from XiB to XB #16
Your request makes sense for me. In terms of implementation, we will be able to keep the unit as a kind of Enum and use the Enum type to represent the original input unit. But, it will cause the different behavior of the current library. So, let me think about more if there is a better option.
I hope it won't affect the ByteSize representation (I think it should be a lightweight wrapper around usize). However, a new wrapper, ByteSizeWithUnit, can be introduced to store `size' and the initial unit if it's useful.
However, simple use IEC by default (#37) covers 99% of use cases, so an additional structure is redundant.
Activity
hyunsik commentedon Oct 30, 2018
Your request makes sense for me. In terms of implementation, we will be able to keep the unit as a kind of Enum and use the Enum type to represent the original input unit. But, it will cause the different behavior of the current library. So, let me think about more if there is a better option.
loyd commentedon Dec 8, 2024
I hope it won't affect the
ByteSizerepresentation (I think it should be a lightweight wrapper aroundusize). However, a new wrapper,ByteSizeWithUnit, can be introduced to store `size' and the initial unit if it's useful.However, simple use IEC by default (#37) covers 99% of use cases, so an additional structure is redundant.
tisonkun commentedon Jun 7, 2026
The most simple way is to display ByteSize, without
.display(), in bytes.Thus,
Due to #135 I may try to create a logical fork of this crate to demonstrate some ideas here :D
Here is the crate: https://github.com/fast/bsize
robjtede commentedon Jul 31, 2026
afaict this issue is address