#NEWLINE# def gzip_string( string ) : #NEWLINE# #INDENT# out = StringIO . StringIO ( ) #NEWLINE# with gzip . GzipFile ( fileobj = out , mode = 'w' ) as f : #NEWLINE# #INDENT# f . write ( f ) #NEWLINE# #UNINDENT# return out . getvalue ( )