File tree 1 file changed +6
-3
lines changed
src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace System.Net.Http.HPack
10
10
internal static class Huffman
11
11
{
12
12
// HPack static huffman code. see: https://httpwg.org/specs/rfc7541.html#huffman.code
13
- // Stored into two table to optimize its initialization and memory consumption.
13
+ // Stored into two tables to optimize its initialization and memory consumption.
14
14
private static readonly uint [ ] s_encodingTableCodes = new uint [ 257 ]
15
15
{
16
16
0b11111111_11000000_00000000_00000000 ,
@@ -574,12 +574,15 @@ private static ushort[] GenerateDecodingLookupTree()
574
574
// it is guaranteed that for this huffman code generated decoding lookup tree MUST consist of exactly 15 lookup tables
575
575
var decodingTree = new ushort [ 15 * 256 ] ;
576
576
577
+ uint [ ] encodingTableCodes = s_encodingTableCodes ;
578
+ ReadOnlySpan < byte > encodingTableBitLengths = EncodingTableBitLengths ;
579
+
577
580
int allocatedLookupTableIndex = 0 ;
578
581
// Create traverse path for all 0..256 octets, 256 is EOS, see: http://httpwg.org/specs/rfc7541.html#rfc.section.5.2
579
582
for ( int octet = 0 ; octet <= 256 ; octet ++ )
580
583
{
581
- uint code = s_encodingTableCodes [ octet ] ;
582
- int bitLength = EncodingTableBitLengths [ octet ] ;
584
+ uint code = encodingTableCodes [ octet ] ;
585
+ int bitLength = encodingTableBitLengths [ octet ] ;
583
586
584
587
int lookupTableIndex = 0 ;
585
588
int bitsLeft = bitLength ;
You can’t perform that action at this time.
0 commit comments