def get_gzipped_contents(input_file):
zbuf = StringIO()<EOL>zfile = GzipFile(mode="<STR_LIT:wb>", compresslevel=<NUM_LIT:6>, fileobj=zbuf)<EOL>zfile.write(input_file.read())<EOL>zfile.close()<EOL>return ContentFile(zbuf.getvalue())<EOL>
Returns a gzipped version of a previously opened file's buffer.