Commit Graph

2 Commits

Author SHA1 Message Date
Nathan Nguyen 524486b412 format: use binary prefixes for HumanBytes file size formatting
Change HumanBytes to use binary prefixes (1024-based) instead of decimal
(1000-based) for file size formatting. This fixes the rounding error where
3072 bytes was displayed as '3.1 KB' instead of '3 KB'.

The decimal constants (KiloByte, MegaByte, etc.) are preserved for other
uses like buffer sizes and memory capacity.

Fixes #13405
2025-12-29 22:05:26 -05:00
Azis Alvriyanto 32285a6d19
format: rename test file from byte_test.go to bytes_test.go (#8865) 2025-02-06 13:06:15 -08:00