def gzip_file(self, target_path, html):
logger.debug("<STR_LIT>".format(self.fs_name, target_path))<EOL>data_buffer = six.BytesIO()<EOL>kwargs = dict(<EOL>filename=path.basename(target_path),<EOL>mode='<STR_LIT:wb>',<EOL>fileobj=data_buffer<EOL>)<EOL>if float(sys.version[:<NUM_LIT:3>]) >= <NUM_LIT>:<EOL><INDENT>kwargs['<STR_LIT>'] = <NUM_LIT:0><EOL><DEDENT>with gzip.GzipFile(**kwargs) as f:<EOL><INDENT>f.write(six.binary_type(html))<EOL><DEDENT>with self.fs.open(smart_text(target_path), '<STR_LIT:wb>') as outfile:<EOL><INDENT>outfile.write(data_buffer.getvalue())<EOL>outfile.close()<EOL><DEDENT>
Zips up the provided HTML as a companion for the provided path.

Intended to take advantage of the peculiarities of
Amazon S3's GZIP service.

mtime, an option that writes a timestamp to the output file
is set to 0, to avoid having s3cmd do unnecessary uploads because
of differences in the timestamp