Brotli

Overview

Brotli is a class in Aspose.Font FOSS for Python.

Brotli utilities expose compress and decompress functions for generic byte content, as well as compressArray and decompressArray for array‑based workflows, facilitating WOFF2 font packaging.

This class provides 8 methods for working with Brotli objects in Python programs. Available methods include: OpenInputBinary, OpenInputFile, OpenOutputFile, __init__, compress, compressArray, decompress, decompressArray. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.

Methods

SignatureDescription
__init__(dictionary_path)Calls init on this Brotli instance.
decompress(content)Decompresses the given Brotli-compressed byte content and returns the original bytes
compress(content, quality)Compresses the given byte content using Brotli with the specified quality level
decompressArray(content)Decompresses a Brotli-compressed array of bytes and returns the decompressed array
compressArray(content, quality)Compresses a byte array using Brotli at the given quality and returns the compressed array
OpenInputFile(input_path)Opens a file at the given path for reading Brotli-compressed data
OpenOutputFile(output_path, force)Opens or creates a file at the given path for writing Brotli-compressed data; force overwrites existing files
OpenInputBinary(input_path)Opens a binary stream from the specified path for Brotli decompression

See Also