alexa
menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class CompressorHuffmanTree

    Represents the Huffman Tree.

    Inheritance
    object
    CompressorHuffmanTree
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Compression
    Assembly: Syncfusion.Compression.NET.dll
    Syntax
    public class CompressorHuffmanTree

    Constructors

    CompressorHuffmanTree(CompressedStreamWriter, int, int, int)

    Create a new Huffman tree

    Declaration
    public CompressorHuffmanTree(CompressedStreamWriter writer, int iElementsCount, int iMinimumCodes, int iMaximumLength)
    Parameters
    Type Name Description
    CompressedStreamWriter writer
    int iElementsCount
    int iMinimumCodes
    int iMaximumLength

    Properties

    CodeFrequences

    Code frequences.

    Declaration
    public short[] CodeFrequences { get; }
    Property Value
    Type
    short[]

    CodeLengths

    Lengths of codes in tree.

    Declaration
    public byte[] CodeLengths { get; }
    Property Value
    Type
    byte[]

    TreeLength

    Length of the tree.

    Declaration
    public int TreeLength { get; }
    Property Value
    Type
    int

    Methods

    BuildCodes()

    Calculates codes from their frequences.

    Declaration
    public void BuildCodes()

    BuildTree()

    Builds tree.

    Declaration
    public void BuildTree()

    CalcBLFreq(CompressorHuffmanTree)

    Calculates code frequences.

    Declaration
    public void CalcBLFreq(CompressorHuffmanTree blTree)
    Parameters
    Type Name Description
    CompressorHuffmanTree blTree

    Tree.

    CheckEmpty()

    Checks wheather tree is empty. If tree is not empty, then exception will be raised.

    Declaration
    public void CheckEmpty()

    GetEncodedLength()

    Calculates length of the compressed data.

    Declaration
    public int GetEncodedLength()
    Returns
    Type Description
    int

    Count of bits, the data will occupy.

    Reset()

    Resets all code data in tree.

    Declaration
    public void Reset()

    SetStaticCodes(short[], byte[])

    Specifies new arrays of codes and their lengths.

    Declaration
    public void SetStaticCodes(short[] codes, byte[] lengths)
    Parameters
    Type Name Description
    short[] codes

    Array of codes.

    byte[] lengths

    Array of code lengths.

    WriteCodeToStream(int)

    Writes code to the compressor output stream.

    Declaration
    public void WriteCodeToStream(int code)
    Parameters
    Type Name Description
    int code

    Code to be written.

    WriteTree(CompressorHuffmanTree)

    Writes tree to output stream.

    Declaration
    public void WriteTree(CompressorHuffmanTree blTree)
    Parameters
    Type Name Description
    CompressorHuffmanTree blTree

    Tree to be written.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved