HybridCompressionMetadata<T>

Models & Types · AiDotNet.ModelCompression

Metadata for hybrid compression combining clustering and Huffman encoding.

Implements: ICompressionMetadata<T>

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

Constructor Summary
HybridCompressionMetadata(WeightClusteringMetadata<T> clusteringMetadata, HuffmanEncodingMetadata<T> huffmanMetadata, int originalLength) Initializes a new instance of the HybridCompressionMetadata class.

Properties

Property Summary
CompressionType Type { get; } Gets the compression type.
HuffmanEncodingMetadata<T> HuffmanMetadata { get; set; } Gets the metadata from the Huffman encoding stage.
WeightClusteringMetadata<T> ClusteringMetadata { get; set; } Gets the metadata from the clustering stage.
int OriginalLength { get; set; } Gets the original length of the weights array.

Methods

Method Summary
long GetMetadataSize() Gets the size in bytes of this metadata structure.