def minify_file(self, target):
html = open(target, '<STR_LIT:rb>').read()<EOL>enc = chardet.detect(html)['<STR_LIT>']<EOL>with codecs.open(target, '<STR_LIT>', enc) as f:<EOL><INDENT>result = htmlmin.minify(f.read(), **self.options)<EOL>f.seek(<NUM_LIT:0>)<EOL>f.write(result)<EOL>f.truncate()<EOL><DEDENT>
Minifies the target html file.