MCPcopy Create free account
hub / github.com/babel/minify / sizeToColor

Function sizeToColor

scripts/pyflate.py:484–494  ·  view source on GitHub ↗
(sz, string)

Source from the content-addressed store, hash-verified

482 reset='\033[0m'
483
484def sizeToColor(sz, string):
485 if sz == 1:
486 c = colors.red
487 elif sz < 10:
488 c = colors.lightred
489 elif sz < 70:
490 c = colors.lightgreen
491 else:
492 c = colors.green
493
494 return c + string + colors.reset
495# Sixteen bits of magic have been removed by the time we start decoding
496def gzip_main(field):
497 b = Bitfield(field)

Callers 2

gzip_mainFunction · 0.85
_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected