Skip to content

Commit e3b25a3

Browse files
committed
Fix, reorder static field for correct initialization order
1 parent 9e79115 commit e3b25a3

File tree

1 file changed

+2
-2
lines changed
  • src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack

1 file changed

+2
-2
lines changed

src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/Huffman.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ namespace System.Net.Http.HPack
99
{
1010
internal static class Huffman
1111
{
12-
private static ushort[] s_decodingTree = GenerateDecodingLookupTree();
13-
1412
// HPack static huffman code. see: https://httpwg.org/specs/rfc7541.html#huffman.code
1513
private static readonly (uint code, int bitLength)[] _encodingTable = new (uint code, int bitLength)[]
1614
{
@@ -273,6 +271,8 @@ internal static class Huffman
273271
(0b11111111_11111111_11111111_11111100, 30)
274272
};
275273

274+
private static ushort[] s_decodingTree = GenerateDecodingLookupTree();
275+
276276
public static (uint encoded, int bitLength) Encode(int data)
277277
{
278278
return _encodingTable[data];

0 commit comments

Comments
 (0)