Skip to content

Commit

Permalink
Review changes - stephentoub dotnet#2
Browse files Browse the repository at this point in the history
  • Loading branch information
rokonec committed Nov 26, 2020
1 parent 3bcd31d commit d6b6252
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace System.Net.Http.HPack
{
internal class Huffman
internal static class Huffman
{
private static ushort[]? s_decodingTree;
private static ushort[] s_decodingTree = GenerateDecodingLookupTree();

// HPack static huffman code. see: https://httpwg.org/specs/rfc7541.html#huffman.code
private static readonly (uint code, int bitLength)[] _encodingTable = new (uint code, int bitLength)[]
Expand Down Expand Up @@ -413,10 +413,6 @@ public static int Decode(ReadOnlySpan<byte> src, ref byte[] dstArray)
Span<byte> dst = dstArray;
Debug.Assert(dst != null && dst.Length > 0);

if (s_decodingTree == null)
{
Volatile.Write(ref s_decodingTree, GenerateDecodingLookupTree());
}
ushort[] decodingTree = s_decodingTree;

int lookupTableIndex = 0;
Expand Down

0 comments on commit d6b6252

Please sign in to comment.