mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 10:08:40 -05:00
Simplify the structure
This commit is contained in:
parent
117a1a36cc
commit
4e702d3f3a
13 changed files with 5 additions and 6 deletions
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
def human_readable_size(num, suffix='B'):
|
||||
for unit in ['','K','M','G','T','P','E','Z']:
|
||||
if abs(num) < 1024.0:
|
||||
return "%3.1f%s%s" % (num, unit, suffix)
|
||||
num /= 1024.0
|
||||
return "%.1f%s%s" % (num, 'Y', suffix)
|
||||
Loading…
Add table
Add a link
Reference in a new issue