Edit

kc3-lang/brotli/python

Branch :

  • Show log

    Commit

  • Author : Alex Nicksay
    Date : 2016-10-24 07:28:56
    Hash : 5632315d
    Message : Python: Support streamed compression with the Compressor object (#448) This adds `flush` and `finish` methods to the `Compressor` object in the extension module, renames the `compress` method to `process`, and updates that method to only process data. Now, one or more `process` calls followed by a `finish` call will be equivalent to a module-level `compress` call. Note: To maximize the compression efficiency (and match underlying Brotli behavior, the `Compressor` object `process` method does not guarantee all input is immediately written to output. To ensure immediate output, call `flush` to manually flush the compression buffer. Extraneous flushing can increase the size, but may be required when processing streaming data. Progress on #191

  • README.md
  • This directory contains the code for the Python brotli module, bro.py tool, and roundtrip tests.

    Development

    To build the module, execute the following from the root project directory:

    $ python setup.py build_ext
    

    To test the module, execute the following from the root project directory:

    $ python setup.py test
    

    Code Style

    Brotli's code follows the Google Python Style Guide. To automatically format your code, install YAPF:

    $ pip install yapf
    

    Then, either format a single file:

    $ yapf --in-place FILE
    

    Or, format all files in a directory:

    $ yapf --in-place --recursive DIR
    

    See the YAPF usage documentation for more information.