mirror of
https://github.com/chylex/Brotli-Builder.git
synced 2024-11-25 07:42:56 +01:00
31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
using System;
|
|
|
|
namespace BrotliLib.Brotli.Dictionary.Index{
|
|
public readonly struct DictionaryIndexEntry{
|
|
public int Packed { get; }
|
|
public byte CopyLength { get; }
|
|
public byte OutputLength { get; }
|
|
|
|
public DictionaryIndexEntry(int packed, int copyLength, int outputLength){
|
|
this.Packed = packed;
|
|
this.CopyLength = (byte)copyLength;
|
|
this.OutputLength = (byte)outputLength;
|
|
}
|
|
|
|
public override bool Equals(object obj){
|
|
return obj is DictionaryIndexEntry entry &&
|
|
Packed == entry.Packed &&
|
|
CopyLength == entry.CopyLength &&
|
|
OutputLength == entry.OutputLength;
|
|
}
|
|
|
|
public override int GetHashCode(){
|
|
return HashCode.Combine(Packed, CopyLength, OutputLength);
|
|
}
|
|
|
|
public override string ToString(){
|
|
return "Packed = " + Packed + ", CopyLength = " + CopyLength + ", OutputLength = " + OutputLength;
|
|
}
|
|
}
|
|
}
|