Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
brotli Namespace Reference

Functions

 compress (string, mode=MODE_GENERIC, quality=11, lgwin=22, lgblock=0)
 

Variables

 MODE_GENERIC = _brotli.MODE_GENERIC
 
 MODE_TEXT = _brotli.MODE_TEXT
 
 MODE_FONT = _brotli.MODE_FONT
 
 Compressor = _brotli.Compressor
 
 Decompressor = _brotli.Decompressor
 
 decompress = _brotli.decompress
 
 error = _brotli.error
 
 version = _brotli.__version__
 

Detailed Description

Functions to compress and decompress data using the Brotli library.

Function Documentation

◆ compress()

compress ( string,
mode = MODE_GENERIC,
quality = 11,
lgwin = 22,
lgblock = 0 )
Compress a byte string.

Args:
  string (bytes): The input data.
  mode (int, optional): The compression mode can be MODE_GENERIC (default),
    MODE_TEXT (for UTF-8 format text input) or MODE_FONT (for WOFF 2.0).
  quality (int, optional): Controls the compression-speed vs compression-
    density tradeoff. The higher the quality, the slower the compression.
    Range is 0 to 11. Defaults to 11.
  lgwin (int, optional): Base 2 logarithm of the sliding window size. Range
    is 10 to 24. Defaults to 22.
  lgblock (int, optional): Base 2 logarithm of the maximum input block size.
    Range is 16 to 24. If set to 0, the value will be set based on the
    quality. Defaults to 0.

Returns:
  The compressed byte string.

Raises:
  brotli.error: If arguments are invalid, or compressor fails.

Variable Documentation

◆ Compressor

Compressor = _brotli.Compressor

◆ decompress

decompress = _brotli.decompress

◆ Decompressor

Decompressor = _brotli.Decompressor

◆ error

error = _brotli.error

◆ MODE_FONT

MODE_FONT = _brotli.MODE_FONT

◆ MODE_GENERIC

MODE_GENERIC = _brotli.MODE_GENERIC

◆ MODE_TEXT

MODE_TEXT = _brotli.MODE_TEXT

◆ version

version ( void ) = _brotli.__version__