From af747beff95e77f9419e200f3cbb87f33473a434 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Fri, 19 Jun 2020 13:23:57 -0700 Subject: [PATCH] use base of 1024 --- progressbar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progressbar.go b/progressbar.go index 6bbe14b..aa14df8 100644 --- a/progressbar.go +++ b/progressbar.go @@ -735,7 +735,7 @@ func average(xs []float64) float64 { func humanizeBytes(s float64, withSuffix bool) string { sizes := []string{" B", " kB", " MB", " GB", " TB", " PB", " EB"} - base := 1000.0 + base := 1024.0 if s < 10 { return fmt.Sprintf("%2.0f B", s) }