411
411
return _decorator
415
def strip_whitespace(f):
419
out = re.sub(r'\n\s+', '\n', out)
420
out = re.sub(r'[ \t]+', ' ', out)
421
out = re.sub(r'\s+\n', '\n', out)
423
log.debug('Saved %sB (%d%%) by stripping whitespace.',
424
human_size(orig_len - new_len),
425
round(100.0 - float(new_len) * 100.0 / float(orig_len)))