(bytes)
| 86 | |
| 87 | |
| 88 | def format_size(bytes): |
| 89 | # type: (float) -> str |
| 90 | if bytes > 1000 * 1000: |
| 91 | return "{:.1f} MB".format(bytes / 1000.0 / 1000) |
| 92 | elif bytes > 10 * 1000: |
| 93 | return "{} kB".format(int(bytes / 1000)) |
| 94 | elif bytes > 1000: |
| 95 | return "{:.1f} kB".format(bytes / 1000.0) |
| 96 | else: |
| 97 | return "{} bytes".format(int(bytes)) |
| 98 | |
| 99 | |
| 100 | class ZipFinder: |