From 44316b223157d59873753548cedfe9b176fd9e80 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Sat, 20 Nov 2021 18:01:45 +0100 Subject: [PATCH] Make HTreeGroup a struct --- src/ImageSharp/Formats/Webp/Lossless/HTreeGroup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/Webp/Lossless/HTreeGroup.cs b/src/ImageSharp/Formats/Webp/Lossless/HTreeGroup.cs index 09ceb0334a..6c2217eb6e 100644 --- a/src/ImageSharp/Formats/Webp/Lossless/HTreeGroup.cs +++ b/src/ImageSharp/Formats/Webp/Lossless/HTreeGroup.cs @@ -13,12 +13,16 @@ namespace SixLabors.ImageSharp.Formats.Webp.Lossless /// - UsePackedTable: few enough literal symbols, so all the bit codes can fit into a small look-up table PackedTable[] /// The common literal base, if applicable, is stored in 'LiteralArb'. /// - internal class HTreeGroup + internal struct HTreeGroup { public HTreeGroup(uint packedTableSize) { this.HTrees = new List(WebpConstants.HuffmanCodesPerMetaCode); this.PackedTable = new HuffmanCode[packedTableSize]; + this.IsTrivialCode = false; + this.IsTrivialLiteral = false; + this.LiteralArb = 0; + this.UsePackedTable = false; } ///