encode_Entropy_encode

encode_Entropy_encode

Overview

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

This class provides 18 methods for working with encode_Entropy_encode objects in Python programs. Available methods include: ConvertBitDepthsToSymbols, CreateHuffmanTree, DecideOverRleUse, EntropyCodeBlockLength, EntropyCodeBlockType, EntropyCodeCommand, EntropyCodeContextMap, EntropyCodeDistance, EntropyCodeLiteral, OptimizeHuffmanCountsForRle, Reverse, ReverseBits, and 6 additional methods. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.

Methods

SignatureDescription
__init__()Calls init on this encode_Entropy_encode instance.
EntropyCodeLiteral()Encodes a literal symbol using entropy coding
EntropyCodeCommand()Encodes a command token using entropy coding
EntropyCodeDistance()Encodes a distance value for LZ-style matches
EntropyCodeBlockLength()Encodes the length of a block in entropy coding
EntropyCodeContextMap()Encodes a context map for adaptive entropy models
EntropyCodeBlockType()Encodes the type identifier of a block
SortHuffmanTree(v0, v1)Sorts two Huffman tree nodes v0 and v1
SetDepth(p, pool, pool_off, depth, depth_off, level)Sets depth values in a pool at given offsets and level
CreateHuffmanTree(data, data_off, length, tree_limit, depth, depth_off)Builds a Huffman tree from data with limits and outputs depths
Reverse(v, start, end)Reverses elements of list v between start and end indices
WriteHuffmanTreeRepetitions(previous_value, value, repetitions, tree, extra_bits_data)Writes Huffman tree repetitions for a value change
WriteHuffmanTreeRepetitionsZeros(repetitions, tree, extra_bits_data)Writes repetitions of zero values in Huffman tree
OptimizeHuffmanCountsForRle(length, counts)Optimizes Huffman symbol counts for run‑length encoding
DecideOverRleUse(depth, depth_off, length, use_rle_for_non_zero, use_rle_for_zero)Decides whether to apply RLE for zero and non‑zero depths
WriteHuffmanTree(depth, depth_off, length, tree, extra_bits_data)Writes a Huffman tree using depth arrays and extra bits
ReverseBits(num_bits, bits)Reverses the order of bits in a number of given bit width
ConvertBitDepthsToSymbols(depth, depth_off, _hx_len, bits, bits_off)Converts bit depth values to symbol codes

See Also