Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def compress(data, **kwargs):
"""zlib.compress(data, **kwargs)
""" + zopfli.__COMPRESSOR_DOCSTRING__ + """
Returns:
String containing a zlib container
"""
kwargs['gzip_mode'] = 0
return zopfli.zopfli.compress(data, **kwargs)
def compress(data, *args, **kwargs):
"""gzip.compress(data, **kwargs)
""" + zopfli.__COMPRESSOR_DOCSTRING__ + """
Returns:
String containing a gzip container
"""
kwargs['gzip_mode'] = 1
return zopfli.zopfli.compress(data, *args, **kwargs)