-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Summary of the new feature/enhancement
Currently, users of Invoke-WebRequest do not know how much they have downloaded because a big Byte number gets displayed and due to the digits not being mono-spaced, I cannot even attempt to count digits whilst the number changes every second. Also, I have no progress bar to tell me how much it needs to download.
Proposed technical implementation details (optional)
ByteSize is a small (14KB) library to better display human readable file sizes but as the problem is quite simple, it was decided to not introduce a dependency but rather just hand-code it instead. Because PowerShell treats 1 KB as 1024, it should probably use 1024 as the base for KB, MB, etc.
I suggest to have one significant digit after after the comma starting with KB and increase the number of significant digits by 1 for MB, GB, etc.
PR here: #14611