How to use the zopfli.zopfli function in zopfli

To help you get started, we’ve selected a few zopfli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wnyc / py-zopfli / zopfli / zlib.py View on Github external
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)
github wnyc / py-zopfli / zopfli / gzip.py View on Github external
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)

zopfli

Zopfli module for python

Apache-2.0
Latest version published 1 month ago

Package Health Score

79 / 100
Full package analysis