Format bytes to human-readable string with MBytes.
(size_in_bytes)
| 63 | |
| 64 | |
| 65 | def fmt_bytes(size_in_bytes): |
| 66 | """Format bytes to human-readable string with MBytes.""" |
| 67 | return f"{size_in_bytes / (1024 * 1024):.0f} MBytes ({size_in_bytes} bytes)" |
| 68 | |
| 69 | |
| 70 | def fmt_hz(rate_in_khz): |