Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: net/spdy/hpack_constants.cc

Issue 393573002: Different SPDY Hpack constant table for startup time and footprint (60KB). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 97% smaller hpack constant table. Now with more comments. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/tools/build_hpack_constants.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/hpack_constants.h" 5 #include "net/spdy/hpack_constants.h"
6 6
7 #include <bitset>
8
9 #include "base/logging.h" 7 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
12 #include "net/spdy/hpack_huffman_table.h" 10 #include "net/spdy/hpack_huffman_table.h"
13 11
14 namespace net { 12 namespace net {
15 13
16 namespace { 14 namespace {
17 15
18 uint32 bits32(const std::string& bitstring) {
19 return std::bitset<32>(bitstring).to_ulong();
20 }
21 16
22 // SharedHpackHuffmanTable is a Singleton wrapping a HpackHuffmanTable 17 // SharedHpackHuffmanTable is a Singleton wrapping a HpackHuffmanTable
23 // instance initialized with |kHpackHuffmanCode|. 18 // instance initialized with |kHpackHuffmanCode|.
24 struct SharedHpackHuffmanTable { 19 struct SharedHpackHuffmanTable {
25 public: 20 public:
26 SharedHpackHuffmanTable() { 21 SharedHpackHuffmanTable() {
27 std::vector<HpackHuffmanSymbol> code = HpackHuffmanCode(); 22 std::vector<HpackHuffmanSymbol> code = HpackHuffmanCode();
28 scoped_ptr<HpackHuffmanTable> mutable_table(new HpackHuffmanTable()); 23 scoped_ptr<HpackHuffmanTable> mutable_table(new HpackHuffmanTable());
29 CHECK(mutable_table->Initialize(&code[0], code.size())); 24 CHECK(mutable_table->Initialize(&code[0], code.size()));
30 CHECK(mutable_table->IsInitialized()); 25 CHECK(mutable_table->IsInitialized());
31 table.reset(mutable_table.release()); 26 table.reset(mutable_table.release());
32 } 27 }
33 28
34 static SharedHpackHuffmanTable* GetInstance() { 29 static SharedHpackHuffmanTable* GetInstance() {
35 return Singleton<SharedHpackHuffmanTable>::get(); 30 return Singleton<SharedHpackHuffmanTable>::get();
36 } 31 }
37 32
38 scoped_ptr<const HpackHuffmanTable> table; 33 scoped_ptr<const HpackHuffmanTable> table;
39 }; 34 };
40 35
41 } // namespace 36 } // namespace
42 37
43 // Produced by applying the python program [1] to tables provided by [2]. 38 // Produced by applying the python program [1] with tables
44 // [1] 39 // provided by [2] (inserted into the source of the python program)
45 // import re, sys 40 // and copy-paste them into this file.
46 // count = 0
47 // for l in sys.stdin:
48 // m = re.match(
49 // r"^ +('.+'|EOS)? \( *(\d+)\) \|([10\|]+) +\w+ \[ ?(\d+)\]", l)
50 // if m:
51 // g = m.groups()
52 // print(' {0b%s, %02s, %03s},%s' % (
53 // g[2].replace('|','').ljust(32,'0'), g[3], g[1],
54 // (' // %s' % g[0]) if g[0] else ''))
55 // count += 1
56 // print("Total: %s" % count)
57 // 41 //
58 // [2] http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07 42 // [1] net/tools/build_hpack_constants.py
43 // [2] http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08
59 44
60 // HpackHuffmanSymbol entries are initialized as {code, length, id}. 45 // HpackHuffmanSymbol entries are initialized as {code, length, id}.
61 // Codes are specified in the |length| most-significant bits of |code|. 46 // Codes are specified in the |length| most-significant bits of |code|.
62 std::vector<HpackHuffmanSymbol> HpackHuffmanCode() { 47 std::vector<HpackHuffmanSymbol> HpackHuffmanCode() {
63 const HpackHuffmanSymbol kHpackHuffmanCode[] = { 48 static const HpackHuffmanSymbol kHpackHuffmanCode[] = {
64 {bits32("11111111110000000000000000000000"), 13, 0}, 49 {0xffc00000ul, 13, 0}, // 11111111|11000
65 {bits32("11111111111111111011000000000000"), 23, 1}, 50 {0xffffb000ul, 23, 1}, // 11111111|11111111|1011000
66 {bits32("11111111111111111111111000100000"), 28, 2}, 51 {0xfffffe20ul, 28, 2}, // 11111111|11111111|11111110|0010
67 {bits32("11111111111111111111111000110000"), 28, 3}, 52 {0xfffffe30ul, 28, 3}, // 11111111|11111111|11111110|0011
68 {bits32("11111111111111111111111001000000"), 28, 4}, 53 {0xfffffe40ul, 28, 4}, // 11111111|11111111|11111110|0100
69 {bits32("11111111111111111111111001010000"), 28, 5}, 54 {0xfffffe50ul, 28, 5}, // 11111111|11111111|11111110|0101
70 {bits32("11111111111111111111111001100000"), 28, 6}, 55 {0xfffffe60ul, 28, 6}, // 11111111|11111111|11111110|0110
71 {bits32("11111111111111111111111001110000"), 28, 7}, 56 {0xfffffe70ul, 28, 7}, // 11111111|11111111|11111110|0111
72 {bits32("11111111111111111111111010000000"), 28, 8}, 57 {0xfffffe80ul, 28, 8}, // 11111111|11111111|11111110|1000
73 {bits32("11111111111111111110101000000000"), 24, 9}, 58 {0xffffea00ul, 24, 9}, // 11111111|11111111|11101010
74 {bits32("11111111111111111111111111110000"), 30, 10}, 59 {0xfffffff0ul, 30, 10}, // 11111111|11111111|11111111|111100
75 {bits32("11111111111111111111111010010000"), 28, 11}, 60 {0xfffffe90ul, 28, 11}, // 11111111|11111111|11111110|1001
76 {bits32("11111111111111111111111010100000"), 28, 12}, 61 {0xfffffea0ul, 28, 12}, // 11111111|11111111|11111110|1010
77 {bits32("11111111111111111111111111110100"), 30, 13}, 62 {0xfffffff4ul, 30, 13}, // 11111111|11111111|11111111|111101
78 {bits32("11111111111111111111111010110000"), 28, 14}, 63 {0xfffffeb0ul, 28, 14}, // 11111111|11111111|11111110|1011
79 {bits32("11111111111111111111111011000000"), 28, 15}, 64 {0xfffffec0ul, 28, 15}, // 11111111|11111111|11111110|1100
80 {bits32("11111111111111111111111011010000"), 28, 16}, 65 {0xfffffed0ul, 28, 16}, // 11111111|11111111|11111110|1101
81 {bits32("11111111111111111111111011100000"), 28, 17}, 66 {0xfffffee0ul, 28, 17}, // 11111111|11111111|11111110|1110
82 {bits32("11111111111111111111111011110000"), 28, 18}, 67 {0xfffffef0ul, 28, 18}, // 11111111|11111111|11111110|1111
83 {bits32("11111111111111111111111100000000"), 28, 19}, 68 {0xffffff00ul, 28, 19}, // 11111111|11111111|11111111|0000
84 {bits32("11111111111111111111111100010000"), 28, 20}, 69 {0xffffff10ul, 28, 20}, // 11111111|11111111|11111111|0001
85 {bits32("11111111111111111111111100100000"), 28, 21}, 70 {0xffffff20ul, 28, 21}, // 11111111|11111111|11111111|0010
86 {bits32("11111111111111111111111111111000"), 30, 22}, 71 {0xfffffff8ul, 30, 22}, // 11111111|11111111|11111111|111110
87 {bits32("11111111111111111111111100110000"), 28, 23}, 72 {0xffffff30ul, 28, 23}, // 11111111|11111111|11111111|0011
88 {bits32("11111111111111111111111101000000"), 28, 24}, 73 {0xffffff40ul, 28, 24}, // 11111111|11111111|11111111|0100
89 {bits32("11111111111111111111111101010000"), 28, 25}, 74 {0xffffff50ul, 28, 25}, // 11111111|11111111|11111111|0101
90 {bits32("11111111111111111111111101100000"), 28, 26}, 75 {0xffffff60ul, 28, 26}, // 11111111|11111111|11111111|0110
91 {bits32("11111111111111111111111101110000"), 28, 27}, 76 {0xffffff70ul, 28, 27}, // 11111111|11111111|11111111|0111
92 {bits32("11111111111111111111111110000000"), 28, 28}, 77 {0xffffff80ul, 28, 28}, // 11111111|11111111|11111111|1000
93 {bits32("11111111111111111111111110010000"), 28, 29}, 78 {0xffffff90ul, 28, 29}, // 11111111|11111111|11111111|1001
94 {bits32("11111111111111111111111110100000"), 28, 30}, 79 {0xffffffa0ul, 28, 30}, // 11111111|11111111|11111111|1010
95 {bits32("11111111111111111111111110110000"), 28, 31}, 80 {0xffffffb0ul, 28, 31}, // 11111111|11111111|11111111|1011
96 {bits32("01010000000000000000000000000000"), 6, 32}, // ' ' 81 {0x50000000ul, 6, 32}, // ' ' 010100
97 {bits32("11111110000000000000000000000000"), 10, 33}, // '!' 82 {0xfe000000ul, 10, 33}, // '!' 11111110|00
98 {bits32("11111110010000000000000000000000"), 10, 34}, // '"' 83 {0xfe400000ul, 10, 34}, // '"' 11111110|01
99 {bits32("11111111101000000000000000000000"), 12, 35}, // '#' 84 {0xffa00000ul, 12, 35}, // '#' 11111111|1010
100 {bits32("11111111110010000000000000000000"), 13, 36}, // '$' 85 {0xffc80000ul, 13, 36}, // '$' 11111111|11001
101 {bits32("01010100000000000000000000000000"), 6, 37}, // '%' 86 {0x54000000ul, 6, 37}, // '%' 010101
102 {bits32("11111000000000000000000000000000"), 8, 38}, // '&' 87 {0xf8000000ul, 8, 38}, // '&' 11111000
103 {bits32("11111111010000000000000000000000"), 11, 39}, // ''' 88 {0xff400000ul, 11, 39}, // ''' 11111111|010
104 {bits32("11111110100000000000000000000000"), 10, 40}, // '(' 89 {0xfe800000ul, 10, 40}, // '(' 11111110|10
105 {bits32("11111110110000000000000000000000"), 10, 41}, // ')' 90 {0xfec00000ul, 10, 41}, // ')' 11111110|11
106 {bits32("11111001000000000000000000000000"), 8, 42}, // '*' 91 {0xf9000000ul, 8, 42}, // '*' 11111001
107 {bits32("11111111011000000000000000000000"), 11, 43}, // '+' 92 {0xff600000ul, 11, 43}, // '+' 11111111|011
108 {bits32("11111010000000000000000000000000"), 8, 44}, // ',' 93 {0xfa000000ul, 8, 44}, // ',' 11111010
109 {bits32("01011000000000000000000000000000"), 6, 45}, // '-' 94 {0x58000000ul, 6, 45}, // '-' 010110
110 {bits32("01011100000000000000000000000000"), 6, 46}, // '.' 95 {0x5c000000ul, 6, 46}, // '.' 010111
111 {bits32("01100000000000000000000000000000"), 6, 47}, // '/' 96 {0x60000000ul, 6, 47}, // '/' 011000
112 {bits32("00000000000000000000000000000000"), 5, 48}, // '0' 97 {0x00000000ul, 5, 48}, // '0' 00000
113 {bits32("00001000000000000000000000000000"), 5, 49}, // '1' 98 {0x08000000ul, 5, 49}, // '1' 00001
114 {bits32("00010000000000000000000000000000"), 5, 50}, // '2' 99 {0x10000000ul, 5, 50}, // '2' 00010
115 {bits32("01100100000000000000000000000000"), 6, 51}, // '3' 100 {0x64000000ul, 6, 51}, // '3' 011001
116 {bits32("01101000000000000000000000000000"), 6, 52}, // '4' 101 {0x68000000ul, 6, 52}, // '4' 011010
117 {bits32("01101100000000000000000000000000"), 6, 53}, // '5' 102 {0x6c000000ul, 6, 53}, // '5' 011011
118 {bits32("01110000000000000000000000000000"), 6, 54}, // '6' 103 {0x70000000ul, 6, 54}, // '6' 011100
119 {bits32("01110100000000000000000000000000"), 6, 55}, // '7' 104 {0x74000000ul, 6, 55}, // '7' 011101
120 {bits32("01111000000000000000000000000000"), 6, 56}, // '8' 105 {0x78000000ul, 6, 56}, // '8' 011110
121 {bits32("01111100000000000000000000000000"), 6, 57}, // '9' 106 {0x7c000000ul, 6, 57}, // '9' 011111
122 {bits32("10111000000000000000000000000000"), 7, 58}, // ':' 107 {0xb8000000ul, 7, 58}, // ':' 1011100
123 {bits32("11111011000000000000000000000000"), 8, 59}, // ';' 108 {0xfb000000ul, 8, 59}, // ';' 11111011
124 {bits32("11111111111110000000000000000000"), 15, 60}, // '<' 109 {0xfff80000ul, 15, 60}, // '<' 11111111|1111100
125 {bits32("10000000000000000000000000000000"), 6, 61}, // '=' 110 {0x80000000ul, 6, 61}, // '=' 100000
126 {bits32("11111111101100000000000000000000"), 12, 62}, // '>' 111 {0xffb00000ul, 12, 62}, // '>' 11111111|1011
127 {bits32("11111111000000000000000000000000"), 10, 63}, // '?' 112 {0xff000000ul, 10, 63}, // '?' 11111111|00
128 {bits32("11111111110100000000000000000000"), 13, 64}, // '@' 113 {0xffd00000ul, 13, 64}, // '@' 11111111|11010
129 {bits32("10000100000000000000000000000000"), 6, 65}, // 'A' 114 {0x84000000ul, 6, 65}, // 'A' 100001
130 {bits32("10111010000000000000000000000000"), 7, 66}, // 'B' 115 {0xba000000ul, 7, 66}, // 'B' 1011101
131 {bits32("10111100000000000000000000000000"), 7, 67}, // 'C' 116 {0xbc000000ul, 7, 67}, // 'C' 1011110
132 {bits32("10111110000000000000000000000000"), 7, 68}, // 'D' 117 {0xbe000000ul, 7, 68}, // 'D' 1011111
133 {bits32("11000000000000000000000000000000"), 7, 69}, // 'E' 118 {0xc0000000ul, 7, 69}, // 'E' 1100000
134 {bits32("11000010000000000000000000000000"), 7, 70}, // 'F' 119 {0xc2000000ul, 7, 70}, // 'F' 1100001
135 {bits32("11000100000000000000000000000000"), 7, 71}, // 'G' 120 {0xc4000000ul, 7, 71}, // 'G' 1100010
136 {bits32("11000110000000000000000000000000"), 7, 72}, // 'H' 121 {0xc6000000ul, 7, 72}, // 'H' 1100011
137 {bits32("11001000000000000000000000000000"), 7, 73}, // 'I' 122 {0xc8000000ul, 7, 73}, // 'I' 1100100
138 {bits32("11001010000000000000000000000000"), 7, 74}, // 'J' 123 {0xca000000ul, 7, 74}, // 'J' 1100101
139 {bits32("11001100000000000000000000000000"), 7, 75}, // 'K' 124 {0xcc000000ul, 7, 75}, // 'K' 1100110
140 {bits32("11001110000000000000000000000000"), 7, 76}, // 'L' 125 {0xce000000ul, 7, 76}, // 'L' 1100111
141 {bits32("11010000000000000000000000000000"), 7, 77}, // 'M' 126 {0xd0000000ul, 7, 77}, // 'M' 1101000
142 {bits32("11010010000000000000000000000000"), 7, 78}, // 'N' 127 {0xd2000000ul, 7, 78}, // 'N' 1101001
143 {bits32("11010100000000000000000000000000"), 7, 79}, // 'O' 128 {0xd4000000ul, 7, 79}, // 'O' 1101010
144 {bits32("11010110000000000000000000000000"), 7, 80}, // 'P' 129 {0xd6000000ul, 7, 80}, // 'P' 1101011
145 {bits32("11011000000000000000000000000000"), 7, 81}, // 'Q' 130 {0xd8000000ul, 7, 81}, // 'Q' 1101100
146 {bits32("11011010000000000000000000000000"), 7, 82}, // 'R' 131 {0xda000000ul, 7, 82}, // 'R' 1101101
147 {bits32("11011100000000000000000000000000"), 7, 83}, // 'S' 132 {0xdc000000ul, 7, 83}, // 'S' 1101110
148 {bits32("11011110000000000000000000000000"), 7, 84}, // 'T' 133 {0xde000000ul, 7, 84}, // 'T' 1101111
149 {bits32("11100000000000000000000000000000"), 7, 85}, // 'U' 134 {0xe0000000ul, 7, 85}, // 'U' 1110000
150 {bits32("11100010000000000000000000000000"), 7, 86}, // 'V' 135 {0xe2000000ul, 7, 86}, // 'V' 1110001
151 {bits32("11100100000000000000000000000000"), 7, 87}, // 'W' 136 {0xe4000000ul, 7, 87}, // 'W' 1110010
152 {bits32("11111100000000000000000000000000"), 8, 88}, // 'X' 137 {0xfc000000ul, 8, 88}, // 'X' 11111100
153 {bits32("11100110000000000000000000000000"), 7, 89}, // 'Y' 138 {0xe6000000ul, 7, 89}, // 'Y' 1110011
154 {bits32("11111101000000000000000000000000"), 8, 90}, // 'Z' 139 {0xfd000000ul, 8, 90}, // 'Z' 11111101
155 {bits32("11111111110110000000000000000000"), 13, 91}, // '[' 140 {0xffd80000ul, 13, 91}, // '[' 11111111|11011
156 {bits32("11111111111111100000000000000000"), 19, 92}, // '\' 141 {0xfffe0000ul, 19, 92}, // '\' 11111111|11111110|000
157 {bits32("11111111111000000000000000000000"), 13, 93}, // ']' 142 {0xffe00000ul, 13, 93}, // ']' 11111111|11100
158 {bits32("11111111111100000000000000000000"), 14, 94}, // '^' 143 {0xfff00000ul, 14, 94}, // '^' 11111111|111100
159 {bits32("10001000000000000000000000000000"), 6, 95}, // '_' 144 {0x88000000ul, 6, 95}, // '_' 100010
160 {bits32("11111111111110100000000000000000"), 15, 96}, // '`' 145 {0xfffa0000ul, 15, 96}, // '`' 11111111|1111101
161 {bits32("00011000000000000000000000000000"), 5, 97}, // 'a' 146 {0x18000000ul, 5, 97}, // 'a' 00011
162 {bits32("10001100000000000000000000000000"), 6, 98}, // 'b' 147 {0x8c000000ul, 6, 98}, // 'b' 100011
163 {bits32("00100000000000000000000000000000"), 5, 99}, // 'c' 148 {0x20000000ul, 5, 99}, // 'c' 00100
164 {bits32("10010000000000000000000000000000"), 6, 100}, // 'd' 149 {0x90000000ul, 6, 100}, // 'd' 100100
165 {bits32("00101000000000000000000000000000"), 5, 101}, // 'e' 150 {0x28000000ul, 5, 101}, // 'e' 00101
166 {bits32("10010100000000000000000000000000"), 6, 102}, // 'f' 151 {0x94000000ul, 6, 102}, // 'f' 100101
167 {bits32("10011000000000000000000000000000"), 6, 103}, // 'g' 152 {0x98000000ul, 6, 103}, // 'g' 100110
168 {bits32("10011100000000000000000000000000"), 6, 104}, // 'h' 153 {0x9c000000ul, 6, 104}, // 'h' 100111
169 {bits32("00110000000000000000000000000000"), 5, 105}, // 'i' 154 {0x30000000ul, 5, 105}, // 'i' 00110
170 {bits32("11101000000000000000000000000000"), 7, 106}, // 'j' 155 {0xe8000000ul, 7, 106}, // 'j' 1110100
171 {bits32("11101010000000000000000000000000"), 7, 107}, // 'k' 156 {0xea000000ul, 7, 107}, // 'k' 1110101
172 {bits32("10100000000000000000000000000000"), 6, 108}, // 'l' 157 {0xa0000000ul, 6, 108}, // 'l' 101000
173 {bits32("10100100000000000000000000000000"), 6, 109}, // 'm' 158 {0xa4000000ul, 6, 109}, // 'm' 101001
174 {bits32("10101000000000000000000000000000"), 6, 110}, // 'n' 159 {0xa8000000ul, 6, 110}, // 'n' 101010
175 {bits32("00111000000000000000000000000000"), 5, 111}, // 'o' 160 {0x38000000ul, 5, 111}, // 'o' 00111
176 {bits32("10101100000000000000000000000000"), 6, 112}, // 'p' 161 {0xac000000ul, 6, 112}, // 'p' 101011
177 {bits32("11101100000000000000000000000000"), 7, 113}, // 'q' 162 {0xec000000ul, 7, 113}, // 'q' 1110110
178 {bits32("10110000000000000000000000000000"), 6, 114}, // 'r' 163 {0xb0000000ul, 6, 114}, // 'r' 101100
179 {bits32("01000000000000000000000000000000"), 5, 115}, // 's' 164 {0x40000000ul, 5, 115}, // 's' 01000
180 {bits32("01001000000000000000000000000000"), 5, 116}, // 't' 165 {0x48000000ul, 5, 116}, // 't' 01001
181 {bits32("10110100000000000000000000000000"), 6, 117}, // 'u' 166 {0xb4000000ul, 6, 117}, // 'u' 101101
182 {bits32("11101110000000000000000000000000"), 7, 118}, // 'v' 167 {0xee000000ul, 7, 118}, // 'v' 1110111
183 {bits32("11110000000000000000000000000000"), 7, 119}, // 'w' 168 {0xf0000000ul, 7, 119}, // 'w' 1111000
184 {bits32("11110010000000000000000000000000"), 7, 120}, // 'x' 169 {0xf2000000ul, 7, 120}, // 'x' 1111001
185 {bits32("11110100000000000000000000000000"), 7, 121}, // 'y' 170 {0xf4000000ul, 7, 121}, // 'y' 1111010
186 {bits32("11110110000000000000000000000000"), 7, 122}, // 'z' 171 {0xf6000000ul, 7, 122}, // 'z' 1111011
187 {bits32("11111111111111000000000000000000"), 15, 123}, // '{' 172 {0xfffc0000ul, 15, 123}, // '{' 11111111|1111110
188 {bits32("11111111100000000000000000000000"), 11, 124}, // '|' 173 {0xff800000ul, 11, 124}, // '|' 11111111|100
189 {bits32("11111111111101000000000000000000"), 14, 125}, // '}' 174 {0xfff40000ul, 14, 125}, // '}' 11111111|111101
190 {bits32("11111111111010000000000000000000"), 13, 126}, // '~' 175 {0xffe80000ul, 13, 126}, // '~' 11111111|11101
191 {bits32("11111111111111111111111111000000"), 28, 127}, 176 {0xffffffc0ul, 28, 127}, // 11111111|11111111|11111111|1100
192 {bits32("11111111111111100110000000000000"), 20, 128}, 177 {0xfffe6000ul, 20, 128}, // 11111111|11111110|0110
193 {bits32("11111111111111110100100000000000"), 22, 129}, 178 {0xffff4800ul, 22, 129}, // 11111111|11111111|010010
194 {bits32("11111111111111100111000000000000"), 20, 130}, 179 {0xfffe7000ul, 20, 130}, // 11111111|11111110|0111
195 {bits32("11111111111111101000000000000000"), 20, 131}, 180 {0xfffe8000ul, 20, 131}, // 11111111|11111110|1000
196 {bits32("11111111111111110100110000000000"), 22, 132}, 181 {0xffff4c00ul, 22, 132}, // 11111111|11111111|010011
197 {bits32("11111111111111110101000000000000"), 22, 133}, 182 {0xffff5000ul, 22, 133}, // 11111111|11111111|010100
198 {bits32("11111111111111110101010000000000"), 22, 134}, 183 {0xffff5400ul, 22, 134}, // 11111111|11111111|010101
199 {bits32("11111111111111111011001000000000"), 23, 135}, 184 {0xffffb200ul, 23, 135}, // 11111111|11111111|1011001
200 {bits32("11111111111111110101100000000000"), 22, 136}, 185 {0xffff5800ul, 22, 136}, // 11111111|11111111|010110
201 {bits32("11111111111111111011010000000000"), 23, 137}, 186 {0xffffb400ul, 23, 137}, // 11111111|11111111|1011010
202 {bits32("11111111111111111011011000000000"), 23, 138}, 187 {0xffffb600ul, 23, 138}, // 11111111|11111111|1011011
203 {bits32("11111111111111111011100000000000"), 23, 139}, 188 {0xffffb800ul, 23, 139}, // 11111111|11111111|1011100
204 {bits32("11111111111111111011101000000000"), 23, 140}, 189 {0xffffba00ul, 23, 140}, // 11111111|11111111|1011101
205 {bits32("11111111111111111011110000000000"), 23, 141}, 190 {0xffffbc00ul, 23, 141}, // 11111111|11111111|1011110
206 {bits32("11111111111111111110101100000000"), 24, 142}, 191 {0xffffeb00ul, 24, 142}, // 11111111|11111111|11101011
207 {bits32("11111111111111111011111000000000"), 23, 143}, 192 {0xffffbe00ul, 23, 143}, // 11111111|11111111|1011111
208 {bits32("11111111111111111110110000000000"), 24, 144}, 193 {0xffffec00ul, 24, 144}, // 11111111|11111111|11101100
209 {bits32("11111111111111111110110100000000"), 24, 145}, 194 {0xffffed00ul, 24, 145}, // 11111111|11111111|11101101
210 {bits32("11111111111111110101110000000000"), 22, 146}, 195 {0xffff5c00ul, 22, 146}, // 11111111|11111111|010111
211 {bits32("11111111111111111100000000000000"), 23, 147}, 196 {0xffffc000ul, 23, 147}, // 11111111|11111111|1100000
212 {bits32("11111111111111111110111000000000"), 24, 148}, 197 {0xffffee00ul, 24, 148}, // 11111111|11111111|11101110
213 {bits32("11111111111111111100001000000000"), 23, 149}, 198 {0xffffc200ul, 23, 149}, // 11111111|11111111|1100001
214 {bits32("11111111111111111100010000000000"), 23, 150}, 199 {0xffffc400ul, 23, 150}, // 11111111|11111111|1100010
215 {bits32("11111111111111111100011000000000"), 23, 151}, 200 {0xffffc600ul, 23, 151}, // 11111111|11111111|1100011
216 {bits32("11111111111111111100100000000000"), 23, 152}, 201 {0xffffc800ul, 23, 152}, // 11111111|11111111|1100100
217 {bits32("11111111111111101110000000000000"), 21, 153}, 202 {0xfffee000ul, 21, 153}, // 11111111|11111110|11100
218 {bits32("11111111111111110110000000000000"), 22, 154}, 203 {0xffff6000ul, 22, 154}, // 11111111|11111111|011000
219 {bits32("11111111111111111100101000000000"), 23, 155}, 204 {0xffffca00ul, 23, 155}, // 11111111|11111111|1100101
220 {bits32("11111111111111110110010000000000"), 22, 156}, 205 {0xffff6400ul, 22, 156}, // 11111111|11111111|011001
221 {bits32("11111111111111111100110000000000"), 23, 157}, 206 {0xffffcc00ul, 23, 157}, // 11111111|11111111|1100110
222 {bits32("11111111111111111100111000000000"), 23, 158}, 207 {0xffffce00ul, 23, 158}, // 11111111|11111111|1100111
223 {bits32("11111111111111111110111100000000"), 24, 159}, 208 {0xffffef00ul, 24, 159}, // 11111111|11111111|11101111
224 {bits32("11111111111111110110100000000000"), 22, 160}, 209 {0xffff6800ul, 22, 160}, // 11111111|11111111|011010
225 {bits32("11111111111111101110100000000000"), 21, 161}, 210 {0xfffee800ul, 21, 161}, // 11111111|11111110|11101
226 {bits32("11111111111111101001000000000000"), 20, 162}, 211 {0xfffe9000ul, 20, 162}, // 11111111|11111110|1001
227 {bits32("11111111111111110110110000000000"), 22, 163}, 212 {0xffff6c00ul, 22, 163}, // 11111111|11111111|011011
228 {bits32("11111111111111110111000000000000"), 22, 164}, 213 {0xffff7000ul, 22, 164}, // 11111111|11111111|011100
229 {bits32("11111111111111111101000000000000"), 23, 165}, 214 {0xffffd000ul, 23, 165}, // 11111111|11111111|1101000
230 {bits32("11111111111111111101001000000000"), 23, 166}, 215 {0xffffd200ul, 23, 166}, // 11111111|11111111|1101001
231 {bits32("11111111111111101111000000000000"), 21, 167}, 216 {0xfffef000ul, 21, 167}, // 11111111|11111110|11110
232 {bits32("11111111111111111101010000000000"), 23, 168}, 217 {0xffffd400ul, 23, 168}, // 11111111|11111111|1101010
233 {bits32("11111111111111110111010000000000"), 22, 169}, 218 {0xffff7400ul, 22, 169}, // 11111111|11111111|011101
234 {bits32("11111111111111110111100000000000"), 22, 170}, 219 {0xffff7800ul, 22, 170}, // 11111111|11111111|011110
235 {bits32("11111111111111111111000000000000"), 24, 171}, 220 {0xfffff000ul, 24, 171}, // 11111111|11111111|11110000
236 {bits32("11111111111111101111100000000000"), 21, 172}, 221 {0xfffef800ul, 21, 172}, // 11111111|11111110|11111
237 {bits32("11111111111111110111110000000000"), 22, 173}, 222 {0xffff7c00ul, 22, 173}, // 11111111|11111111|011111
238 {bits32("11111111111111111101011000000000"), 23, 174}, 223 {0xffffd600ul, 23, 174}, // 11111111|11111111|1101011
239 {bits32("11111111111111111101100000000000"), 23, 175}, 224 {0xffffd800ul, 23, 175}, // 11111111|11111111|1101100
240 {bits32("11111111111111110000000000000000"), 21, 176}, 225 {0xffff0000ul, 21, 176}, // 11111111|11111111|00000
241 {bits32("11111111111111110000100000000000"), 21, 177}, 226 {0xffff0800ul, 21, 177}, // 11111111|11111111|00001
242 {bits32("11111111111111111000000000000000"), 22, 178}, 227 {0xffff8000ul, 22, 178}, // 11111111|11111111|100000
243 {bits32("11111111111111110001000000000000"), 21, 179}, 228 {0xffff1000ul, 21, 179}, // 11111111|11111111|00010
244 {bits32("11111111111111111101101000000000"), 23, 180}, 229 {0xffffda00ul, 23, 180}, // 11111111|11111111|1101101
245 {bits32("11111111111111111000010000000000"), 22, 181}, 230 {0xffff8400ul, 22, 181}, // 11111111|11111111|100001
246 {bits32("11111111111111111101110000000000"), 23, 182}, 231 {0xffffdc00ul, 23, 182}, // 11111111|11111111|1101110
247 {bits32("11111111111111111101111000000000"), 23, 183}, 232 {0xffffde00ul, 23, 183}, // 11111111|11111111|1101111
248 {bits32("11111111111111101010000000000000"), 20, 184}, 233 {0xfffea000ul, 20, 184}, // 11111111|11111110|1010
249 {bits32("11111111111111111000100000000000"), 22, 185}, 234 {0xffff8800ul, 22, 185}, // 11111111|11111111|100010
250 {bits32("11111111111111111000110000000000"), 22, 186}, 235 {0xffff8c00ul, 22, 186}, // 11111111|11111111|100011
251 {bits32("11111111111111111001000000000000"), 22, 187}, 236 {0xffff9000ul, 22, 187}, // 11111111|11111111|100100
252 {bits32("11111111111111111110000000000000"), 23, 188}, 237 {0xffffe000ul, 23, 188}, // 11111111|11111111|1110000
253 {bits32("11111111111111111001010000000000"), 22, 189}, 238 {0xffff9400ul, 22, 189}, // 11111111|11111111|100101
254 {bits32("11111111111111111001100000000000"), 22, 190}, 239 {0xffff9800ul, 22, 190}, // 11111111|11111111|100110
255 {bits32("11111111111111111110001000000000"), 23, 191}, 240 {0xffffe200ul, 23, 191}, // 11111111|11111111|1110001
256 {bits32("11111111111111111111100000000000"), 26, 192}, 241 {0xfffff800ul, 26, 192}, // 11111111|11111111|11111000|00
257 {bits32("11111111111111111111100001000000"), 26, 193}, 242 {0xfffff840ul, 26, 193}, // 11111111|11111111|11111000|01
258 {bits32("11111111111111101011000000000000"), 20, 194}, 243 {0xfffeb000ul, 20, 194}, // 11111111|11111110|1011
259 {bits32("11111111111111100010000000000000"), 19, 195}, 244 {0xfffe2000ul, 19, 195}, // 11111111|11111110|001
260 {bits32("11111111111111111001110000000000"), 22, 196}, 245 {0xffff9c00ul, 22, 196}, // 11111111|11111111|100111
261 {bits32("11111111111111111110010000000000"), 23, 197}, 246 {0xffffe400ul, 23, 197}, // 11111111|11111111|1110010
262 {bits32("11111111111111111010000000000000"), 22, 198}, 247 {0xffffa000ul, 22, 198}, // 11111111|11111111|101000
263 {bits32("11111111111111111111011000000000"), 25, 199}, 248 {0xfffff600ul, 25, 199}, // 11111111|11111111|11110110|0
264 {bits32("11111111111111111111100010000000"), 26, 200}, 249 {0xfffff880ul, 26, 200}, // 11111111|11111111|11111000|10
265 {bits32("11111111111111111111100011000000"), 26, 201}, 250 {0xfffff8c0ul, 26, 201}, // 11111111|11111111|11111000|11
266 {bits32("11111111111111111111100100000000"), 26, 202}, 251 {0xfffff900ul, 26, 202}, // 11111111|11111111|11111001|00
267 {bits32("11111111111111111111101111000000"), 27, 203}, 252 {0xfffffbc0ul, 27, 203}, // 11111111|11111111|11111011|110
268 {bits32("11111111111111111111101111100000"), 27, 204}, 253 {0xfffffbe0ul, 27, 204}, // 11111111|11111111|11111011|111
269 {bits32("11111111111111111111100101000000"), 26, 205}, 254 {0xfffff940ul, 26, 205}, // 11111111|11111111|11111001|01
270 {bits32("11111111111111111111000100000000"), 24, 206}, 255 {0xfffff100ul, 24, 206}, // 11111111|11111111|11110001
271 {bits32("11111111111111111111011010000000"), 25, 207}, 256 {0xfffff680ul, 25, 207}, // 11111111|11111111|11110110|1
272 {bits32("11111111111111100100000000000000"), 19, 208}, 257 {0xfffe4000ul, 19, 208}, // 11111111|11111110|010
273 {bits32("11111111111111110001100000000000"), 21, 209}, 258 {0xffff1800ul, 21, 209}, // 11111111|11111111|00011
274 {bits32("11111111111111111111100110000000"), 26, 210}, 259 {0xfffff980ul, 26, 210}, // 11111111|11111111|11111001|10
275 {bits32("11111111111111111111110000000000"), 27, 211}, 260 {0xfffffc00ul, 27, 211}, // 11111111|11111111|11111100|000
276 {bits32("11111111111111111111110000100000"), 27, 212}, 261 {0xfffffc20ul, 27, 212}, // 11111111|11111111|11111100|001
277 {bits32("11111111111111111111100111000000"), 26, 213}, 262 {0xfffff9c0ul, 26, 213}, // 11111111|11111111|11111001|11
278 {bits32("11111111111111111111110001000000"), 27, 214}, 263 {0xfffffc40ul, 27, 214}, // 11111111|11111111|11111100|010
279 {bits32("11111111111111111111001000000000"), 24, 215}, 264 {0xfffff200ul, 24, 215}, // 11111111|11111111|11110010
280 {bits32("11111111111111110010000000000000"), 21, 216}, 265 {0xffff2000ul, 21, 216}, // 11111111|11111111|00100
281 {bits32("11111111111111110010100000000000"), 21, 217}, 266 {0xffff2800ul, 21, 217}, // 11111111|11111111|00101
282 {bits32("11111111111111111111101000000000"), 26, 218}, 267 {0xfffffa00ul, 26, 218}, // 11111111|11111111|11111010|00
283 {bits32("11111111111111111111101001000000"), 26, 219}, 268 {0xfffffa40ul, 26, 219}, // 11111111|11111111|11111010|01
284 {bits32("11111111111111111111111111010000"), 28, 220}, 269 {0xffffffd0ul, 28, 220}, // 11111111|11111111|11111111|1101
285 {bits32("11111111111111111111110001100000"), 27, 221}, 270 {0xfffffc60ul, 27, 221}, // 11111111|11111111|11111100|011
286 {bits32("11111111111111111111110010000000"), 27, 222}, 271 {0xfffffc80ul, 27, 222}, // 11111111|11111111|11111100|100
287 {bits32("11111111111111111111110010100000"), 27, 223}, 272 {0xfffffca0ul, 27, 223}, // 11111111|11111111|11111100|101
288 {bits32("11111111111111101100000000000000"), 20, 224}, 273 {0xfffec000ul, 20, 224}, // 11111111|11111110|1100
289 {bits32("11111111111111111111001100000000"), 24, 225}, 274 {0xfffff300ul, 24, 225}, // 11111111|11111111|11110011
290 {bits32("11111111111111101101000000000000"), 20, 226}, 275 {0xfffed000ul, 20, 226}, // 11111111|11111110|1101
291 {bits32("11111111111111110011000000000000"), 21, 227}, 276 {0xffff3000ul, 21, 227}, // 11111111|11111111|00110
292 {bits32("11111111111111111010010000000000"), 22, 228}, 277 {0xffffa400ul, 22, 228}, // 11111111|11111111|101001
293 {bits32("11111111111111110011100000000000"), 21, 229}, 278 {0xffff3800ul, 21, 229}, // 11111111|11111111|00111
294 {bits32("11111111111111110100000000000000"), 21, 230}, 279 {0xffff4000ul, 21, 230}, // 11111111|11111111|01000
295 {bits32("11111111111111111110011000000000"), 23, 231}, 280 {0xffffe600ul, 23, 231}, // 11111111|11111111|1110011
296 {bits32("11111111111111111010100000000000"), 22, 232}, 281 {0xffffa800ul, 22, 232}, // 11111111|11111111|101010
297 {bits32("11111111111111111010110000000000"), 22, 233}, 282 {0xffffac00ul, 22, 233}, // 11111111|11111111|101011
298 {bits32("11111111111111111111011100000000"), 25, 234}, 283 {0xfffff700ul, 25, 234}, // 11111111|11111111|11110111|0
299 {bits32("11111111111111111111011110000000"), 25, 235}, 284 {0xfffff780ul, 25, 235}, // 11111111|11111111|11110111|1
300 {bits32("11111111111111111111010000000000"), 24, 236}, 285 {0xfffff400ul, 24, 236}, // 11111111|11111111|11110100
301 {bits32("11111111111111111111010100000000"), 24, 237}, 286 {0xfffff500ul, 24, 237}, // 11111111|11111111|11110101
302 {bits32("11111111111111111111101010000000"), 26, 238}, 287 {0xfffffa80ul, 26, 238}, // 11111111|11111111|11111010|10
303 {bits32("11111111111111111110100000000000"), 23, 239}, 288 {0xffffe800ul, 23, 239}, // 11111111|11111111|1110100
304 {bits32("11111111111111111111101011000000"), 26, 240}, 289 {0xfffffac0ul, 26, 240}, // 11111111|11111111|11111010|11
305 {bits32("11111111111111111111110011000000"), 27, 241}, 290 {0xfffffcc0ul, 27, 241}, // 11111111|11111111|11111100|110
306 {bits32("11111111111111111111101100000000"), 26, 242}, 291 {0xfffffb00ul, 26, 242}, // 11111111|11111111|11111011|00
307 {bits32("11111111111111111111101101000000"), 26, 243}, 292 {0xfffffb40ul, 26, 243}, // 11111111|11111111|11111011|01
308 {bits32("11111111111111111111110011100000"), 27, 244}, 293 {0xfffffce0ul, 27, 244}, // 11111111|11111111|11111100|111
309 {bits32("11111111111111111111110100000000"), 27, 245}, 294 {0xfffffd00ul, 27, 245}, // 11111111|11111111|11111101|000
310 {bits32("11111111111111111111110100100000"), 27, 246}, 295 {0xfffffd20ul, 27, 246}, // 11111111|11111111|11111101|001
311 {bits32("11111111111111111111110101000000"), 27, 247}, 296 {0xfffffd40ul, 27, 247}, // 11111111|11111111|11111101|010
312 {bits32("11111111111111111111110101100000"), 27, 248}, 297 {0xfffffd60ul, 27, 248}, // 11111111|11111111|11111101|011
313 {bits32("11111111111111111111111111100000"), 28, 249}, 298 {0xffffffe0ul, 28, 249}, // 11111111|11111111|11111111|1110
314 {bits32("11111111111111111111110110000000"), 27, 250}, 299 {0xfffffd80ul, 27, 250}, // 11111111|11111111|11111101|100
315 {bits32("11111111111111111111110110100000"), 27, 251}, 300 {0xfffffda0ul, 27, 251}, // 11111111|11111111|11111101|101
316 {bits32("11111111111111111111110111000000"), 27, 252}, 301 {0xfffffdc0ul, 27, 252}, // 11111111|11111111|11111101|110
317 {bits32("11111111111111111111110111100000"), 27, 253}, 302 {0xfffffde0ul, 27, 253}, // 11111111|11111111|11111101|111
318 {bits32("11111111111111111111111000000000"), 27, 254}, 303 {0xfffffe00ul, 27, 254}, // 11111111|11111111|11111110|000
319 {bits32("11111111111111111111101110000000"), 26, 255}, 304 {0xfffffb80ul, 26, 255}, // 11111111|11111111|11111011|10
320 {bits32("11111111111111111111111111111100"), 30, 256}, // EOS 305 {0xfffffffcul, 30, 256}, // EOS 11111111|11111111|11111111|111111
321 }; 306 };
322 return std::vector<HpackHuffmanSymbol>( 307 return std::vector<HpackHuffmanSymbol>(
323 kHpackHuffmanCode, 308 kHpackHuffmanCode,
324 kHpackHuffmanCode + arraysize(kHpackHuffmanCode)); 309 kHpackHuffmanCode + arraysize(kHpackHuffmanCode));
325 } 310 }
326 311
327 const HpackHuffmanTable& ObtainHpackHuffmanTable() { 312 const HpackHuffmanTable& ObtainHpackHuffmanTable() {
328 return *SharedHpackHuffmanTable::GetInstance()->table; 313 return *SharedHpackHuffmanTable::GetInstance()->table;
329 } 314 }
330 315
331 } // namespace net 316 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/tools/build_hpack_constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698