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
TThe 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
clusteringMetadataWeightClusteringMetadata<T>Metadata from the clustering stage.
huffmanMetadataHuffmanEncodingMetadata<T>Metadata from the Huffman encoding stage.
originalLengthintThe original length of the weights array.
Properties
ClusteringMetadata
Gets the metadata from the clustering stage.
public WeightClusteringMetadata<T> ClusteringMetadata { get; }
Property Value
HuffmanMetadata
Gets the metadata from the Huffman encoding stage.
public HuffmanEncodingMetadata<T> HuffmanMetadata { get; }
Property Value
OriginalLength
Gets the original length of the weights array.
public int OriginalLength { get; }
Property Value
Type
Gets the compression type.
public CompressionType Type { get; }
Property Value
Methods
GetMetadataSize()
Gets the size in bytes of this metadata structure.
public long GetMetadataSize()