encode_Brotli_bit_stream
Overview
encode_Brotli_bit_stream is a class in Aspose.Font FOSS for Python.
This class provides 22 methods for working with encode_Brotli_bit_stream objects in Python programs.
Available methods include: BuildAndStoreBlockSplitCode, BuildAndStoreHuffmanTree, EncodeContextMap, EncodeMlen, IndexOf, JumpToByteBoundary, MoveToFront, MoveToFrontTransform, RunLengthCodeZeros, StoreBlockSwitch, StoreCompressedMetaBlockHeader, StoreHuffmanTree, and 10 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 encode_Brotli_bit_stream instance. |
EncodeMlen(length, bits, numbits, nibblesbits) | Encodes a match length into the bit stream using provided bit parameters |
StoreVarLenUint8(n, storage_ix, storage) | Writes an 8‑bit integer n to storage at index storage_ix using variable‑length encoding |
StoreCompressedMetaBlockHeader(final_block, length, storage_ix, storage) | Writes a compressed meta‑block header, marking final block and length |
StoreUncompressedMetaBlockHeader(length, storage_ix, storage) | Writes an uncompressed meta‑block header with given length |
StoreHuffmanTreeOfHuffmanTreeToBitMask(num_codes, code_length_bitdepth, storage_ix, storage) | Stores the Huffman‑tree‑of‑Huffman representation as a bit mask |
StoreHuffmanTreeToBitMask(huffman_tree, huffman_tree_extra_bits, code_length_bitdepth, code_length_bitdepth_off, code_length_bitdepth_symbols, storage_ix, storage) | Converts a Huffman tree and its extra bits into a bit‑mask and writes it |
StoreSimpleHuffmanTree(depths, depths_off, symbols, num_symbols, max_bits, storage_ix, storage) | Writes a simple Huffman tree defined by depths and symbols |
StoreHuffmanTree(depths, depths_off, num, storage_ix, storage) | Stores a Huffman tree using a depth array and count |
BuildAndStoreHuffmanTree(histogram, length, depth, depth_off, bits, bits_off, storage_ix, storage) | Builds a Huffman tree from a histogram and stores it |
IndexOf(v, value) | Returns the index of value within list v, or -1 if not found |
MoveToFront(v, index) | Moves the element at index in list v to the front |
MoveToFrontTransform(v) | Applies a move‑to‑front transform to list v |
RunLengthCodeZeros(v_in, max_run_length_prefix, v_out, extra_bits) | Encodes runs of zeros from v_in into v_out with given max prefix |
EncodeContextMap(context_map, num_clusters, storage_ix, storage) | Writes a context map with clustering information to storage |
StoreBlockSwitch(code, block_ix, storage_ix, storage) | Records a block switch code at block index |
BuildAndStoreBlockSplitCode(types, lengths, num_types, code, storage_ix, storage) | Creates and stores block split codes from type lengths |
StoreTrivialContextMap(num_types, context_bits, storage_ix, storage) | Writes a simple context map using num_types and context bits |
JumpToByteBoundary(storage_ix, storage) | Advances storage index to the next byte boundary |
StoreMetaBlock(input, start_pos, length, mask, prev_byte, prev_byte2, is_last, num_direct_distance_codes, distance_postfix_bits, literal_context_mode, commands, n_commands, mb, storage_ix, storage) | Writes a Brotli meta‑block to a bit storage array, handling literals, commands and block headers |
StoreMetaBlockTrivial(input, start_pos, length, mask, is_last, commands, n_commands, storage_ix, storage, storage_off) | Writes a simple meta block without complex transforms |
StoreUncompressedMetaBlock(final_block, input, position, mask, _hx_len, storage_ix, storage, storage_off) | Writes an uncompressed meta block, marking final block if needed |