Main
Overview
Main is a class in Aspose.Font FOSS for Python.
Inherits from: decode_Decode.
Main.ParseQuality parses quality settings from string s into the quality object.
This class provides 27 methods for working with Main objects in Python programs.
Available methods include: BROTLI_FAILURE, BROTLI_LOG, BROTLI_LOG_ARRAY_INDEX, BROTLI_LOG_UCHAR_VECTOR, BROTLI_LOG_UINT, BrotliDecompress, BrotliDecompressStreaming, BrotliDecompressedSize, CopyUncompressedBlockToOutput, DecodeBlockType, DecodeBlockTypeWithContext, DecodeContextMap, and 15 additional methods.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__init__() | Calls init on this Main instance. |
ParseQuality(s, quality) | Parses quality settings from string s into the quality object |
ParseArgv(argc, argv, input_path, output_path, force, quality, decompress) | Processes command‑line arguments (argc, argv) and fills input_path, output_path, force, quality, decompress |
main() | Serves as the program entry point executing the font tool workflow |
BROTLI_FAILURE() | Returns a constant indicating a Brotli decompression failure |
BROTLI_LOG_UINT(x) | Logs an unsigned integer x for Brotli debugging |
BROTLI_LOG_ARRAY_INDEX(array_name, idx) | Logs the index idx of array_name for Brotli debugging |
BROTLI_LOG(x) | Logs a generic message x during Brotli processing |
BROTLI_LOG_UCHAR_VECTOR(v, _hx_len) | Logs a vector v of length _hx_len for Brotli debugging |
DecodeWindowBits(br) | Reads window bits from bit reader br for Brotli stream |
DecodeVarLenUint8(br) | Reads a variable‑length uint8 from bit reader br |
JumpToByteBoundary(br) | Advances br to the next byte boundary |
DecodeMetaBlockLength(br, meta_block_length, input_end, is_metadata, is_uncompressed) | Decodes a meta‑block length from br, setting length and flags |
ReadSymbol(table, table_off, br) | Reads a symbol from table at offset table_off using br |
ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, s) | Reads Huffman code lengths for num_symbols into code_lengths |
ReadHuffmanCode(alphabet_size, table, table_off, opt_table_size, s) | Builds a Huffman code table for alphabet_size using br and s |
ReadBlockLength(table, table_off, br) | Reads a block length from table at table_off using br |
TranslateShortCodes(code, ringbuffer, index) | Converts short code to ringbuffer position at index |
InverseMoveToFrontTransform(v, v_len) | Reverses MTF on vector v of length v_len |
HuffmanTreeGroupDecode(group, s) | Decodes a group of Huffman trees using s |
DecodeContextMap(context_map_size, num_htrees, context_map, s) | Decodes a context map of given size and number of trees using s |
DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) | Determines block type using max_block_type and related tables |
DecodeBlockTypeWithContext(s, br) | Decodes block type with additional context from br |
CopyUncompressedBlockToOutput(output, pos, s) | Copies uncompressed block data to output at position pos |
BrotliDecompressedSize(encoded_size, encoded_buffer, encoded_buffer_off, decoded_size) | Computes decompressed size from encoded buffer parameters |
BrotliDecompressStreaming(input, output, finish, s) | Performs streaming Brotli decompression from input to output |
BrotliDecompress(input, output) | Decompresses a complete Brotli buffer from input to output |