diff options
Diffstat (limited to 'python/brotli.py')
-rw-r--r-- | python/brotli.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/python/brotli.py b/python/brotli.py new file mode 100644 index 0000000..b63e218 --- /dev/null +++ b/python/brotli.py @@ -0,0 +1,26 @@ +# Copyright 2016 The Brotli Authors. All rights reserved. +# +# Distributed under MIT license. +# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + +"""Functions to compress and decompress data using the Brotli library.""" + +import _brotli + + +# The library version. +__version__ = _brotli.__version__ + +# The compression mode. +MODE_GENERIC = _brotli.MODE_GENERIC +MODE_TEXT = _brotli.MODE_TEXT +MODE_FONT = _brotli.MODE_FONT + +# Compress a byte string. +compress = _brotli.compress + +# Decompress a compressed byte string. +decompress = _brotli.decompress + +# Raised if compression or decompression fails. +error = _brotli.error |