Table of Contents

Class HybridCompressionMetadata<T>

Namespace
AiDotNet.ModelCompression
Assembly
AiDotNet.dll

Metadata for hybrid compression combining clustering and Huffman encoding.

public class HybridCompressionMetadata<T> : ICompressionMetadata<T>

Type Parameters

T

The numeric type.

Inheritance
HybridCompressionMetadata<T>
Implements
Inherited Members

Remarks

For Beginners: This metadata combines information from both compression stages: - Clustering metadata (cluster centers and assignments) - Huffman metadata (encoding tree and table)

During decompression, Huffman decoding is applied first, then clustering decompression.

Constructors

HybridCompressionMetadata(WeightClusteringMetadata<T>, HuffmanEncodingMetadata<T>, int)

Initializes a new instance of the HybridCompressionMetadata class.

public HybridCompressionMetadata(WeightClusteringMetadata<T> clusteringMetadata, HuffmanEncodingMetadata<T> huffmanMetadata, int originalLength)

Parameters

clusteringMetadata WeightClusteringMetadata<T>

Metadata from the clustering stage.

huffmanMetadata HuffmanEncodingMetadata<T>

Metadata from the Huffman encoding stage.

originalLength int

The original length of the weights array.

Properties

ClusteringMetadata

Gets the metadata from the clustering stage.

public WeightClusteringMetadata<T> ClusteringMetadata { get; }

Property Value

WeightClusteringMetadata<T>

HuffmanMetadata

Gets the metadata from the Huffman encoding stage.

public HuffmanEncodingMetadata<T> HuffmanMetadata { get; }

Property Value

HuffmanEncodingMetadata<T>

OriginalLength

Gets the original length of the weights array.

public int OriginalLength { get; }

Property Value

int

Type

Gets the compression type.

public CompressionType Type { get; }

Property Value

CompressionType

Methods

GetMetadataSize()

Gets the size in bytes of this metadata structure.

public long GetMetadataSize()

Returns

long