OLD | NEW |
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> | 7 #include <bitset> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // (' // %s' % g[0]) if g[0] else '')) | 54 // (' // %s' % g[0]) if g[0] else '')) |
55 // count += 1 | 55 // count += 1 |
56 // print("Total: %s" % count) | 56 // print("Total: %s" % count) |
57 // | 57 // |
58 // [2] http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07 | 58 // [2] http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07 |
59 | 59 |
60 // HpackHuffmanSymbol entries are initialized as {code, length, id}. | 60 // HpackHuffmanSymbol entries are initialized as {code, length, id}. |
61 // Codes are specified in the |length| most-significant bits of |code|. | 61 // Codes are specified in the |length| most-significant bits of |code|. |
62 std::vector<HpackHuffmanSymbol> HpackHuffmanCode() { | 62 std::vector<HpackHuffmanSymbol> HpackHuffmanCode() { |
63 const HpackHuffmanSymbol kHpackHuffmanCode[] = { | 63 const HpackHuffmanSymbol kHpackHuffmanCode[] = { |
64 {bits32("11111111111111111110111010000000"), 26, 0}, | 64 {bits32("11111111110000000000000000000000"), 13, 0}, |
65 {bits32("11111111111111111110111011000000"), 26, 1}, | 65 {bits32("11111111111111111011000000000000"), 23, 1}, |
66 {bits32("11111111111111111110111100000000"), 26, 2}, | 66 {bits32("11111111111111111111111000100000"), 28, 2}, |
67 {bits32("11111111111111111110111101000000"), 26, 3}, | 67 {bits32("11111111111111111111111000110000"), 28, 3}, |
68 {bits32("11111111111111111110111110000000"), 26, 4}, | 68 {bits32("11111111111111111111111001000000"), 28, 4}, |
69 {bits32("11111111111111111110111111000000"), 26, 5}, | 69 {bits32("11111111111111111111111001010000"), 28, 5}, |
70 {bits32("11111111111111111111000000000000"), 26, 6}, | 70 {bits32("11111111111111111111111001100000"), 28, 6}, |
71 {bits32("11111111111111111111000001000000"), 26, 7}, | 71 {bits32("11111111111111111111111001110000"), 28, 7}, |
72 {bits32("11111111111111111111000010000000"), 26, 8}, | 72 {bits32("11111111111111111111111010000000"), 28, 8}, |
73 {bits32("11111111111111111111000011000000"), 26, 9}, | 73 {bits32("11111111111111111110101000000000"), 24, 9}, |
74 {bits32("11111111111111111111000100000000"), 26, 10}, | 74 {bits32("11111111111111111111111111110000"), 30, 10}, |
75 {bits32("11111111111111111111000101000000"), 26, 11}, | 75 {bits32("11111111111111111111111010010000"), 28, 11}, |
76 {bits32("11111111111111111111000110000000"), 26, 12}, | 76 {bits32("11111111111111111111111010100000"), 28, 12}, |
77 {bits32("11111111111111111111000111000000"), 26, 13}, | 77 {bits32("11111111111111111111111111110100"), 30, 13}, |
78 {bits32("11111111111111111111001000000000"), 26, 14}, | 78 {bits32("11111111111111111111111010110000"), 28, 14}, |
79 {bits32("11111111111111111111001001000000"), 26, 15}, | 79 {bits32("11111111111111111111111011000000"), 28, 15}, |
80 {bits32("11111111111111111111001010000000"), 26, 16}, | 80 {bits32("11111111111111111111111011010000"), 28, 16}, |
81 {bits32("11111111111111111111001011000000"), 26, 17}, | 81 {bits32("11111111111111111111111011100000"), 28, 17}, |
82 {bits32("11111111111111111111001100000000"), 26, 18}, | 82 {bits32("11111111111111111111111011110000"), 28, 18}, |
83 {bits32("11111111111111111111001101000000"), 26, 19}, | 83 {bits32("11111111111111111111111100000000"), 28, 19}, |
84 {bits32("11111111111111111111001110000000"), 26, 20}, | 84 {bits32("11111111111111111111111100010000"), 28, 20}, |
85 {bits32("11111111111111111111001111000000"), 26, 21}, | 85 {bits32("11111111111111111111111100100000"), 28, 21}, |
86 {bits32("11111111111111111111010000000000"), 26, 22}, | 86 {bits32("11111111111111111111111111111000"), 30, 22}, |
87 {bits32("11111111111111111111010001000000"), 26, 23}, | 87 {bits32("11111111111111111111111100110000"), 28, 23}, |
88 {bits32("11111111111111111111010010000000"), 26, 24}, | 88 {bits32("11111111111111111111111101000000"), 28, 24}, |
89 {bits32("11111111111111111111010011000000"), 26, 25}, | 89 {bits32("11111111111111111111111101010000"), 28, 25}, |
90 {bits32("11111111111111111111010100000000"), 26, 26}, | 90 {bits32("11111111111111111111111101100000"), 28, 26}, |
91 {bits32("11111111111111111111010101000000"), 26, 27}, | 91 {bits32("11111111111111111111111101110000"), 28, 27}, |
92 {bits32("11111111111111111111010110000000"), 26, 28}, | 92 {bits32("11111111111111111111111110000000"), 28, 28}, |
93 {bits32("11111111111111111111010111000000"), 26, 29}, | 93 {bits32("11111111111111111111111110010000"), 28, 29}, |
94 {bits32("11111111111111111111011000000000"), 26, 30}, | 94 {bits32("11111111111111111111111110100000"), 28, 30}, |
95 {bits32("11111111111111111111011001000000"), 26, 31}, | 95 {bits32("11111111111111111111111110110000"), 28, 31}, |
96 {bits32("00110000000000000000000000000000"), 5, 32}, // ' ' | 96 {bits32("01010000000000000000000000000000"), 6, 32}, // ' ' |
97 {bits32("11111111111000000000000000000000"), 13, 33}, // '!' | 97 {bits32("11111110000000000000000000000000"), 10, 33}, // '!' |
98 {bits32("11111000000000000000000000000000"), 9, 34}, // '"' | 98 {bits32("11111110010000000000000000000000"), 10, 34}, // '"' |
99 {bits32("11111111111100000000000000000000"), 14, 35}, // '#' | 99 {bits32("11111111101000000000000000000000"), 12, 35}, // '#' |
100 {bits32("11111111111110000000000000000000"), 15, 36}, // '$' | 100 {bits32("11111111110010000000000000000000"), 13, 36}, // '$' |
101 {bits32("01111000000000000000000000000000"), 6, 37}, // '%' | 101 {bits32("01010100000000000000000000000000"), 6, 37}, // '%' |
102 {bits32("11001000000000000000000000000000"), 7, 38}, // '&' | 102 {bits32("11111000000000000000000000000000"), 8, 38}, // '&' |
103 {bits32("11111111111010000000000000000000"), 13, 39}, // ''' | 103 {bits32("11111111010000000000000000000000"), 11, 39}, // ''' |
104 {bits32("11111110100000000000000000000000"), 10, 40}, // '(' | 104 {bits32("11111110100000000000000000000000"), 10, 40}, // '(' |
105 {bits32("11111000100000000000000000000000"), 9, 41}, // ')' | 105 {bits32("11111110110000000000000000000000"), 10, 41}, // ')' |
106 {bits32("11111110110000000000000000000000"), 10, 42}, // '*' | 106 {bits32("11111001000000000000000000000000"), 8, 42}, // '*' |
107 {bits32("11111111000000000000000000000000"), 10, 43}, // '+' | 107 {bits32("11111111011000000000000000000000"), 11, 43}, // '+' |
108 {bits32("11001010000000000000000000000000"), 7, 44}, // ',' | 108 {bits32("11111010000000000000000000000000"), 8, 44}, // ',' |
109 {bits32("11001100000000000000000000000000"), 7, 45}, // '-' | 109 {bits32("01011000000000000000000000000000"), 6, 45}, // '-' |
110 {bits32("01111100000000000000000000000000"), 6, 46}, // '.' | 110 {bits32("01011100000000000000000000000000"), 6, 46}, // '.' |
111 {bits32("00111000000000000000000000000000"), 5, 47}, // '/' | 111 {bits32("01100000000000000000000000000000"), 6, 47}, // '/' |
112 {bits32("00000000000000000000000000000000"), 4, 48}, // '0' | 112 {bits32("00000000000000000000000000000000"), 5, 48}, // '0' |
113 {bits32("00010000000000000000000000000000"), 4, 49}, // '1' | 113 {bits32("00001000000000000000000000000000"), 5, 49}, // '1' |
114 {bits32("00100000000000000000000000000000"), 4, 50}, // '2' | 114 {bits32("00010000000000000000000000000000"), 5, 50}, // '2' |
115 {bits32("01000000000000000000000000000000"), 5, 51}, // '3' | 115 {bits32("01100100000000000000000000000000"), 6, 51}, // '3' |
116 {bits32("10000000000000000000000000000000"), 6, 52}, // '4' | 116 {bits32("01101000000000000000000000000000"), 6, 52}, // '4' |
117 {bits32("10000100000000000000000000000000"), 6, 53}, // '5' | 117 {bits32("01101100000000000000000000000000"), 6, 53}, // '5' |
118 {bits32("10001000000000000000000000000000"), 6, 54}, // '6' | 118 {bits32("01110000000000000000000000000000"), 6, 54}, // '6' |
119 {bits32("10001100000000000000000000000000"), 6, 55}, // '7' | 119 {bits32("01110100000000000000000000000000"), 6, 55}, // '7' |
120 {bits32("10010000000000000000000000000000"), 6, 56}, // '8' | 120 {bits32("01111000000000000000000000000000"), 6, 56}, // '8' |
121 {bits32("10010100000000000000000000000000"), 6, 57}, // '9' | 121 {bits32("01111100000000000000000000000000"), 6, 57}, // '9' |
122 {bits32("10011000000000000000000000000000"), 6, 58}, // ':' | 122 {bits32("10111000000000000000000000000000"), 7, 58}, // ':' |
123 {bits32("11101100000000000000000000000000"), 8, 59}, // ';' | 123 {bits32("11111011000000000000000000000000"), 8, 59}, // ';' |
124 {bits32("11111111111111100000000000000000"), 17, 60}, // '<' | 124 {bits32("11111111111110000000000000000000"), 15, 60}, // '<' |
125 {bits32("10011100000000000000000000000000"), 6, 61}, // '=' | 125 {bits32("10000000000000000000000000000000"), 6, 61}, // '=' |
126 {bits32("11111111111110100000000000000000"), 15, 62}, // '>' | 126 {bits32("11111111101100000000000000000000"), 12, 62}, // '>' |
127 {bits32("11111111010000000000000000000000"), 10, 63}, // '?' | 127 {bits32("11111111000000000000000000000000"), 10, 63}, // '?' |
128 {bits32("11111111111111000000000000000000"), 15, 64}, // '@' | 128 {bits32("11111111110100000000000000000000"), 13, 64}, // '@' |
129 {bits32("11001110000000000000000000000000"), 7, 65}, // 'A' | 129 {bits32("10000100000000000000000000000000"), 6, 65}, // 'A' |
130 {bits32("11101101000000000000000000000000"), 8, 66}, // 'B' | 130 {bits32("10111010000000000000000000000000"), 7, 66}, // 'B' |
131 {bits32("11101110000000000000000000000000"), 8, 67}, // 'C' | 131 {bits32("10111100000000000000000000000000"), 7, 67}, // 'C' |
132 {bits32("11010000000000000000000000000000"), 7, 68}, // 'D' | 132 {bits32("10111110000000000000000000000000"), 7, 68}, // 'D' |
133 {bits32("11101111000000000000000000000000"), 8, 69}, // 'E' | 133 {bits32("11000000000000000000000000000000"), 7, 69}, // 'E' |
134 {bits32("11010010000000000000000000000000"), 7, 70}, // 'F' | 134 {bits32("11000010000000000000000000000000"), 7, 70}, // 'F' |
135 {bits32("11010100000000000000000000000000"), 7, 71}, // 'G' | 135 {bits32("11000100000000000000000000000000"), 7, 71}, // 'G' |
136 {bits32("11111001000000000000000000000000"), 9, 72}, // 'H' | 136 {bits32("11000110000000000000000000000000"), 7, 72}, // 'H' |
137 {bits32("11110000000000000000000000000000"), 8, 73}, // 'I' | 137 {bits32("11001000000000000000000000000000"), 7, 73}, // 'I' |
138 {bits32("11111001100000000000000000000000"), 9, 74}, // 'J' | 138 {bits32("11001010000000000000000000000000"), 7, 74}, // 'J' |
139 {bits32("11111010000000000000000000000000"), 9, 75}, // 'K' | 139 {bits32("11001100000000000000000000000000"), 7, 75}, // 'K' |
140 {bits32("11111010100000000000000000000000"), 9, 76}, // 'L' | 140 {bits32("11001110000000000000000000000000"), 7, 76}, // 'L' |
141 {bits32("11010110000000000000000000000000"), 7, 77}, // 'M' | 141 {bits32("11010000000000000000000000000000"), 7, 77}, // 'M' |
142 {bits32("11011000000000000000000000000000"), 7, 78}, // 'N' | 142 {bits32("11010010000000000000000000000000"), 7, 78}, // 'N' |
143 {bits32("11110001000000000000000000000000"), 8, 79}, // 'O' | 143 {bits32("11010100000000000000000000000000"), 7, 79}, // 'O' |
144 {bits32("11110010000000000000000000000000"), 8, 80}, // 'P' | 144 {bits32("11010110000000000000000000000000"), 7, 80}, // 'P' |
145 {bits32("11111011000000000000000000000000"), 9, 81}, // 'Q' | 145 {bits32("11011000000000000000000000000000"), 7, 81}, // 'Q' |
146 {bits32("11111011100000000000000000000000"), 9, 82}, // 'R' | 146 {bits32("11011010000000000000000000000000"), 7, 82}, // 'R' |
147 {bits32("11011010000000000000000000000000"), 7, 83}, // 'S' | 147 {bits32("11011100000000000000000000000000"), 7, 83}, // 'S' |
148 {bits32("10100000000000000000000000000000"), 6, 84}, // 'T' | 148 {bits32("11011110000000000000000000000000"), 7, 84}, // 'T' |
149 {bits32("11110011000000000000000000000000"), 8, 85}, // 'U' | 149 {bits32("11100000000000000000000000000000"), 7, 85}, // 'U' |
150 {bits32("11111100000000000000000000000000"), 9, 86}, // 'V' | 150 {bits32("11100010000000000000000000000000"), 7, 86}, // 'V' |
151 {bits32("11111100100000000000000000000000"), 9, 87}, // 'W' | 151 {bits32("11100100000000000000000000000000"), 7, 87}, // 'W' |
152 {bits32("11110100000000000000000000000000"), 8, 88}, // 'X' | 152 {bits32("11111100000000000000000000000000"), 8, 88}, // 'X' |
153 {bits32("11111101000000000000000000000000"), 9, 89}, // 'Y' | 153 {bits32("11100110000000000000000000000000"), 7, 89}, // 'Y' |
154 {bits32("11111101100000000000000000000000"), 9, 90}, // 'Z' | 154 {bits32("11111101000000000000000000000000"), 8, 90}, // 'Z' |
155 {bits32("11111111100000000000000000000000"), 11, 91}, // '[' | 155 {bits32("11111111110110000000000000000000"), 13, 91}, // '[' |
156 {bits32("11111111111111111111011010000000"), 26, 92}, // '\' | 156 {bits32("11111111111111100000000000000000"), 19, 92}, // '\' |
157 {bits32("11111111101000000000000000000000"), 11, 93}, // ']' | 157 {bits32("11111111111000000000000000000000"), 13, 93}, // ']' |
158 {bits32("11111111111101000000000000000000"), 14, 94}, // '^' | 158 {bits32("11111111111100000000000000000000"), 14, 94}, // '^' |
159 {bits32("11011100000000000000000000000000"), 7, 95}, // '_' | 159 {bits32("10001000000000000000000000000000"), 6, 95}, // '_' |
160 {bits32("11111111111111111000000000000000"), 18, 96}, // '`' | 160 {bits32("11111111111110100000000000000000"), 15, 96}, // '`' |
161 {bits32("01001000000000000000000000000000"), 5, 97}, // 'a' | 161 {bits32("00011000000000000000000000000000"), 5, 97}, // 'a' |
162 {bits32("11011110000000000000000000000000"), 7, 98}, // 'b' | 162 {bits32("10001100000000000000000000000000"), 6, 98}, // 'b' |
163 {bits32("01010000000000000000000000000000"), 5, 99}, // 'c' | 163 {bits32("00100000000000000000000000000000"), 5, 99}, // 'c' |
164 {bits32("10100100000000000000000000000000"), 6, 100}, // 'd' | 164 {bits32("10010000000000000000000000000000"), 6, 100}, // 'd' |
165 {bits32("01011000000000000000000000000000"), 5, 101}, // 'e' | 165 {bits32("00101000000000000000000000000000"), 5, 101}, // 'e' |
166 {bits32("11100000000000000000000000000000"), 7, 102}, // 'f' | 166 {bits32("10010100000000000000000000000000"), 6, 102}, // 'f' |
167 {bits32("10101000000000000000000000000000"), 6, 103}, // 'g' | 167 {bits32("10011000000000000000000000000000"), 6, 103}, // 'g' |
168 {bits32("10101100000000000000000000000000"), 6, 104}, // 'h' | 168 {bits32("10011100000000000000000000000000"), 6, 104}, // 'h' |
169 {bits32("01100000000000000000000000000000"), 5, 105}, // 'i' | 169 {bits32("00110000000000000000000000000000"), 5, 105}, // 'i' |
170 {bits32("11110101000000000000000000000000"), 8, 106}, // 'j' | 170 {bits32("11101000000000000000000000000000"), 7, 106}, // 'j' |
171 {bits32("11110110000000000000000000000000"), 8, 107}, // 'k' | 171 {bits32("11101010000000000000000000000000"), 7, 107}, // 'k' |
172 {bits32("10110000000000000000000000000000"), 6, 108}, // 'l' | 172 {bits32("10100000000000000000000000000000"), 6, 108}, // 'l' |
173 {bits32("10110100000000000000000000000000"), 6, 109}, // 'm' | 173 {bits32("10100100000000000000000000000000"), 6, 109}, // 'm' |
174 {bits32("10111000000000000000000000000000"), 6, 110}, // 'n' | 174 {bits32("10101000000000000000000000000000"), 6, 110}, // 'n' |
175 {bits32("01101000000000000000000000000000"), 5, 111}, // 'o' | 175 {bits32("00111000000000000000000000000000"), 5, 111}, // 'o' |
176 {bits32("10111100000000000000000000000000"), 6, 112}, // 'p' | 176 {bits32("10101100000000000000000000000000"), 6, 112}, // 'p' |
177 {bits32("11111110000000000000000000000000"), 9, 113}, // 'q' | 177 {bits32("11101100000000000000000000000000"), 7, 113}, // 'q' |
178 {bits32("11000000000000000000000000000000"), 6, 114}, // 'r' | 178 {bits32("10110000000000000000000000000000"), 6, 114}, // 'r' |
179 {bits32("11000100000000000000000000000000"), 6, 115}, // 's' | 179 {bits32("01000000000000000000000000000000"), 5, 115}, // 's' |
180 {bits32("01110000000000000000000000000000"), 5, 116}, // 't' | 180 {bits32("01001000000000000000000000000000"), 5, 116}, // 't' |
181 {bits32("11100010000000000000000000000000"), 7, 117}, // 'u' | 181 {bits32("10110100000000000000000000000000"), 6, 117}, // 'u' |
182 {bits32("11100100000000000000000000000000"), 7, 118}, // 'v' | 182 {bits32("11101110000000000000000000000000"), 7, 118}, // 'v' |
183 {bits32("11100110000000000000000000000000"), 7, 119}, // 'w' | 183 {bits32("11110000000000000000000000000000"), 7, 119}, // 'w' |
184 {bits32("11101000000000000000000000000000"), 7, 120}, // 'x' | 184 {bits32("11110010000000000000000000000000"), 7, 120}, // 'x' |
185 {bits32("11101010000000000000000000000000"), 7, 121}, // 'y' | 185 {bits32("11110100000000000000000000000000"), 7, 121}, // 'y' |
186 {bits32("11110111000000000000000000000000"), 8, 122}, // 'z' | 186 {bits32("11110110000000000000000000000000"), 7, 122}, // 'z' |
187 {bits32("11111111111111101000000000000000"), 17, 123}, // '{' | 187 {bits32("11111111111111000000000000000000"), 15, 123}, // '{' |
188 {bits32("11111111110000000000000000000000"), 12, 124}, // '|' | 188 {bits32("11111111100000000000000000000000"), 11, 124}, // '|' |
189 {bits32("11111111111111110000000000000000"), 17, 125}, // '}' | 189 {bits32("11111111111101000000000000000000"), 14, 125}, // '}' |
190 {bits32("11111111110100000000000000000000"), 12, 126}, // '~' | 190 {bits32("11111111111010000000000000000000"), 13, 126}, // '~' |
191 {bits32("11111111111111111111011011000000"), 26, 127}, | 191 {bits32("11111111111111111111111111000000"), 28, 127}, |
192 {bits32("11111111111111111111011100000000"), 26, 128}, | 192 {bits32("11111111111111100110000000000000"), 20, 128}, |
193 {bits32("11111111111111111111011101000000"), 26, 129}, | 193 {bits32("11111111111111110100100000000000"), 22, 129}, |
194 {bits32("11111111111111111111011110000000"), 26, 130}, | 194 {bits32("11111111111111100111000000000000"), 20, 130}, |
195 {bits32("11111111111111111111011111000000"), 26, 131}, | 195 {bits32("11111111111111101000000000000000"), 20, 131}, |
196 {bits32("11111111111111111111100000000000"), 26, 132}, | 196 {bits32("11111111111111110100110000000000"), 22, 132}, |
197 {bits32("11111111111111111111100001000000"), 26, 133}, | 197 {bits32("11111111111111110101000000000000"), 22, 133}, |
198 {bits32("11111111111111111111100010000000"), 26, 134}, | 198 {bits32("11111111111111110101010000000000"), 22, 134}, |
199 {bits32("11111111111111111111100011000000"), 26, 135}, | 199 {bits32("11111111111111111011001000000000"), 23, 135}, |
200 {bits32("11111111111111111111100100000000"), 26, 136}, | 200 {bits32("11111111111111110101100000000000"), 22, 136}, |
201 {bits32("11111111111111111111100101000000"), 26, 137}, | 201 {bits32("11111111111111111011010000000000"), 23, 137}, |
202 {bits32("11111111111111111111100110000000"), 26, 138}, | 202 {bits32("11111111111111111011011000000000"), 23, 138}, |
203 {bits32("11111111111111111111100111000000"), 26, 139}, | 203 {bits32("11111111111111111011100000000000"), 23, 139}, |
204 {bits32("11111111111111111111101000000000"), 26, 140}, | 204 {bits32("11111111111111111011101000000000"), 23, 140}, |
205 {bits32("11111111111111111111101001000000"), 26, 141}, | 205 {bits32("11111111111111111011110000000000"), 23, 141}, |
206 {bits32("11111111111111111111101010000000"), 26, 142}, | 206 {bits32("11111111111111111110101100000000"), 24, 142}, |
207 {bits32("11111111111111111111101011000000"), 26, 143}, | 207 {bits32("11111111111111111011111000000000"), 23, 143}, |
208 {bits32("11111111111111111111101100000000"), 26, 144}, | 208 {bits32("11111111111111111110110000000000"), 24, 144}, |
209 {bits32("11111111111111111111101101000000"), 26, 145}, | 209 {bits32("11111111111111111110110100000000"), 24, 145}, |
210 {bits32("11111111111111111111101110000000"), 26, 146}, | 210 {bits32("11111111111111110101110000000000"), 22, 146}, |
211 {bits32("11111111111111111111101111000000"), 26, 147}, | 211 {bits32("11111111111111111100000000000000"), 23, 147}, |
212 {bits32("11111111111111111111110000000000"), 26, 148}, | 212 {bits32("11111111111111111110111000000000"), 24, 148}, |
213 {bits32("11111111111111111111110001000000"), 26, 149}, | 213 {bits32("11111111111111111100001000000000"), 23, 149}, |
214 {bits32("11111111111111111111110010000000"), 26, 150}, | 214 {bits32("11111111111111111100010000000000"), 23, 150}, |
215 {bits32("11111111111111111111110011000000"), 26, 151}, | 215 {bits32("11111111111111111100011000000000"), 23, 151}, |
216 {bits32("11111111111111111111110100000000"), 26, 152}, | 216 {bits32("11111111111111111100100000000000"), 23, 152}, |
217 {bits32("11111111111111111111110101000000"), 26, 153}, | 217 {bits32("11111111111111101110000000000000"), 21, 153}, |
218 {bits32("11111111111111111111110110000000"), 26, 154}, | 218 {bits32("11111111111111110110000000000000"), 22, 154}, |
219 {bits32("11111111111111111111110111000000"), 26, 155}, | 219 {bits32("11111111111111111100101000000000"), 23, 155}, |
220 {bits32("11111111111111111111111000000000"), 26, 156}, | 220 {bits32("11111111111111110110010000000000"), 22, 156}, |
221 {bits32("11111111111111111111111001000000"), 26, 157}, | 221 {bits32("11111111111111111100110000000000"), 23, 157}, |
222 {bits32("11111111111111111111111010000000"), 26, 158}, | 222 {bits32("11111111111111111100111000000000"), 23, 158}, |
223 {bits32("11111111111111111111111011000000"), 26, 159}, | 223 {bits32("11111111111111111110111100000000"), 24, 159}, |
224 {bits32("11111111111111111111111100000000"), 26, 160}, | 224 {bits32("11111111111111110110100000000000"), 22, 160}, |
225 {bits32("11111111111111111111111101000000"), 26, 161}, | 225 {bits32("11111111111111101110100000000000"), 21, 161}, |
226 {bits32("11111111111111111111111110000000"), 26, 162}, | 226 {bits32("11111111111111101001000000000000"), 20, 162}, |
227 {bits32("11111111111111111111111111000000"), 26, 163}, | 227 {bits32("11111111111111110110110000000000"), 22, 163}, |
228 {bits32("11111111111111111100000000000000"), 25, 164}, | 228 {bits32("11111111111111110111000000000000"), 22, 164}, |
229 {bits32("11111111111111111100000010000000"), 25, 165}, | 229 {bits32("11111111111111111101000000000000"), 23, 165}, |
230 {bits32("11111111111111111100000100000000"), 25, 166}, | 230 {bits32("11111111111111111101001000000000"), 23, 166}, |
231 {bits32("11111111111111111100000110000000"), 25, 167}, | 231 {bits32("11111111111111101111000000000000"), 21, 167}, |
232 {bits32("11111111111111111100001000000000"), 25, 168}, | 232 {bits32("11111111111111111101010000000000"), 23, 168}, |
233 {bits32("11111111111111111100001010000000"), 25, 169}, | 233 {bits32("11111111111111110111010000000000"), 22, 169}, |
234 {bits32("11111111111111111100001100000000"), 25, 170}, | 234 {bits32("11111111111111110111100000000000"), 22, 170}, |
235 {bits32("11111111111111111100001110000000"), 25, 171}, | 235 {bits32("11111111111111111111000000000000"), 24, 171}, |
236 {bits32("11111111111111111100010000000000"), 25, 172}, | 236 {bits32("11111111111111101111100000000000"), 21, 172}, |
237 {bits32("11111111111111111100010010000000"), 25, 173}, | 237 {bits32("11111111111111110111110000000000"), 22, 173}, |
238 {bits32("11111111111111111100010100000000"), 25, 174}, | 238 {bits32("11111111111111111101011000000000"), 23, 174}, |
239 {bits32("11111111111111111100010110000000"), 25, 175}, | 239 {bits32("11111111111111111101100000000000"), 23, 175}, |
240 {bits32("11111111111111111100011000000000"), 25, 176}, | 240 {bits32("11111111111111110000000000000000"), 21, 176}, |
241 {bits32("11111111111111111100011010000000"), 25, 177}, | 241 {bits32("11111111111111110000100000000000"), 21, 177}, |
242 {bits32("11111111111111111100011100000000"), 25, 178}, | 242 {bits32("11111111111111111000000000000000"), 22, 178}, |
243 {bits32("11111111111111111100011110000000"), 25, 179}, | 243 {bits32("11111111111111110001000000000000"), 21, 179}, |
244 {bits32("11111111111111111100100000000000"), 25, 180}, | 244 {bits32("11111111111111111101101000000000"), 23, 180}, |
245 {bits32("11111111111111111100100010000000"), 25, 181}, | 245 {bits32("11111111111111111000010000000000"), 22, 181}, |
246 {bits32("11111111111111111100100100000000"), 25, 182}, | 246 {bits32("11111111111111111101110000000000"), 23, 182}, |
247 {bits32("11111111111111111100100110000000"), 25, 183}, | 247 {bits32("11111111111111111101111000000000"), 23, 183}, |
248 {bits32("11111111111111111100101000000000"), 25, 184}, | 248 {bits32("11111111111111101010000000000000"), 20, 184}, |
249 {bits32("11111111111111111100101010000000"), 25, 185}, | 249 {bits32("11111111111111111000100000000000"), 22, 185}, |
250 {bits32("11111111111111111100101100000000"), 25, 186}, | 250 {bits32("11111111111111111000110000000000"), 22, 186}, |
251 {bits32("11111111111111111100101110000000"), 25, 187}, | 251 {bits32("11111111111111111001000000000000"), 22, 187}, |
252 {bits32("11111111111111111100110000000000"), 25, 188}, | 252 {bits32("11111111111111111110000000000000"), 23, 188}, |
253 {bits32("11111111111111111100110010000000"), 25, 189}, | 253 {bits32("11111111111111111001010000000000"), 22, 189}, |
254 {bits32("11111111111111111100110100000000"), 25, 190}, | 254 {bits32("11111111111111111001100000000000"), 22, 190}, |
255 {bits32("11111111111111111100110110000000"), 25, 191}, | 255 {bits32("11111111111111111110001000000000"), 23, 191}, |
256 {bits32("11111111111111111100111000000000"), 25, 192}, | 256 {bits32("11111111111111111111100000000000"), 26, 192}, |
257 {bits32("11111111111111111100111010000000"), 25, 193}, | 257 {bits32("11111111111111111111100001000000"), 26, 193}, |
258 {bits32("11111111111111111100111100000000"), 25, 194}, | 258 {bits32("11111111111111101011000000000000"), 20, 194}, |
259 {bits32("11111111111111111100111110000000"), 25, 195}, | 259 {bits32("11111111111111100010000000000000"), 19, 195}, |
260 {bits32("11111111111111111101000000000000"), 25, 196}, | 260 {bits32("11111111111111111001110000000000"), 22, 196}, |
261 {bits32("11111111111111111101000010000000"), 25, 197}, | 261 {bits32("11111111111111111110010000000000"), 23, 197}, |
262 {bits32("11111111111111111101000100000000"), 25, 198}, | 262 {bits32("11111111111111111010000000000000"), 22, 198}, |
263 {bits32("11111111111111111101000110000000"), 25, 199}, | 263 {bits32("11111111111111111111011000000000"), 25, 199}, |
264 {bits32("11111111111111111101001000000000"), 25, 200}, | 264 {bits32("11111111111111111111100010000000"), 26, 200}, |
265 {bits32("11111111111111111101001010000000"), 25, 201}, | 265 {bits32("11111111111111111111100011000000"), 26, 201}, |
266 {bits32("11111111111111111101001100000000"), 25, 202}, | 266 {bits32("11111111111111111111100100000000"), 26, 202}, |
267 {bits32("11111111111111111101001110000000"), 25, 203}, | 267 {bits32("11111111111111111111101111000000"), 27, 203}, |
268 {bits32("11111111111111111101010000000000"), 25, 204}, | 268 {bits32("11111111111111111111101111100000"), 27, 204}, |
269 {bits32("11111111111111111101010010000000"), 25, 205}, | 269 {bits32("11111111111111111111100101000000"), 26, 205}, |
270 {bits32("11111111111111111101010100000000"), 25, 206}, | 270 {bits32("11111111111111111111000100000000"), 24, 206}, |
271 {bits32("11111111111111111101010110000000"), 25, 207}, | 271 {bits32("11111111111111111111011010000000"), 25, 207}, |
272 {bits32("11111111111111111101011000000000"), 25, 208}, | 272 {bits32("11111111111111100100000000000000"), 19, 208}, |
273 {bits32("11111111111111111101011010000000"), 25, 209}, | 273 {bits32("11111111111111110001100000000000"), 21, 209}, |
274 {bits32("11111111111111111101011100000000"), 25, 210}, | 274 {bits32("11111111111111111111100110000000"), 26, 210}, |
275 {bits32("11111111111111111101011110000000"), 25, 211}, | 275 {bits32("11111111111111111111110000000000"), 27, 211}, |
276 {bits32("11111111111111111101100000000000"), 25, 212}, | 276 {bits32("11111111111111111111110000100000"), 27, 212}, |
277 {bits32("11111111111111111101100010000000"), 25, 213}, | 277 {bits32("11111111111111111111100111000000"), 26, 213}, |
278 {bits32("11111111111111111101100100000000"), 25, 214}, | 278 {bits32("11111111111111111111110001000000"), 27, 214}, |
279 {bits32("11111111111111111101100110000000"), 25, 215}, | 279 {bits32("11111111111111111111001000000000"), 24, 215}, |
280 {bits32("11111111111111111101101000000000"), 25, 216}, | 280 {bits32("11111111111111110010000000000000"), 21, 216}, |
281 {bits32("11111111111111111101101010000000"), 25, 217}, | 281 {bits32("11111111111111110010100000000000"), 21, 217}, |
282 {bits32("11111111111111111101101100000000"), 25, 218}, | 282 {bits32("11111111111111111111101000000000"), 26, 218}, |
283 {bits32("11111111111111111101101110000000"), 25, 219}, | 283 {bits32("11111111111111111111101001000000"), 26, 219}, |
284 {bits32("11111111111111111101110000000000"), 25, 220}, | 284 {bits32("11111111111111111111111111010000"), 28, 220}, |
285 {bits32("11111111111111111101110010000000"), 25, 221}, | 285 {bits32("11111111111111111111110001100000"), 27, 221}, |
286 {bits32("11111111111111111101110100000000"), 25, 222}, | 286 {bits32("11111111111111111111110010000000"), 27, 222}, |
287 {bits32("11111111111111111101110110000000"), 25, 223}, | 287 {bits32("11111111111111111111110010100000"), 27, 223}, |
288 {bits32("11111111111111111101111000000000"), 25, 224}, | 288 {bits32("11111111111111101100000000000000"), 20, 224}, |
289 {bits32("11111111111111111101111010000000"), 25, 225}, | 289 {bits32("11111111111111111111001100000000"), 24, 225}, |
290 {bits32("11111111111111111101111100000000"), 25, 226}, | 290 {bits32("11111111111111101101000000000000"), 20, 226}, |
291 {bits32("11111111111111111101111110000000"), 25, 227}, | 291 {bits32("11111111111111110011000000000000"), 21, 227}, |
292 {bits32("11111111111111111110000000000000"), 25, 228}, | 292 {bits32("11111111111111111010010000000000"), 22, 228}, |
293 {bits32("11111111111111111110000010000000"), 25, 229}, | 293 {bits32("11111111111111110011100000000000"), 21, 229}, |
294 {bits32("11111111111111111110000100000000"), 25, 230}, | 294 {bits32("11111111111111110100000000000000"), 21, 230}, |
295 {bits32("11111111111111111110000110000000"), 25, 231}, | 295 {bits32("11111111111111111110011000000000"), 23, 231}, |
296 {bits32("11111111111111111110001000000000"), 25, 232}, | 296 {bits32("11111111111111111010100000000000"), 22, 232}, |
297 {bits32("11111111111111111110001010000000"), 25, 233}, | 297 {bits32("11111111111111111010110000000000"), 22, 233}, |
298 {bits32("11111111111111111110001100000000"), 25, 234}, | 298 {bits32("11111111111111111111011100000000"), 25, 234}, |
299 {bits32("11111111111111111110001110000000"), 25, 235}, | 299 {bits32("11111111111111111111011110000000"), 25, 235}, |
300 {bits32("11111111111111111110010000000000"), 25, 236}, | 300 {bits32("11111111111111111111010000000000"), 24, 236}, |
301 {bits32("11111111111111111110010010000000"), 25, 237}, | 301 {bits32("11111111111111111111010100000000"), 24, 237}, |
302 {bits32("11111111111111111110010100000000"), 25, 238}, | 302 {bits32("11111111111111111111101010000000"), 26, 238}, |
303 {bits32("11111111111111111110010110000000"), 25, 239}, | 303 {bits32("11111111111111111110100000000000"), 23, 239}, |
304 {bits32("11111111111111111110011000000000"), 25, 240}, | 304 {bits32("11111111111111111111101011000000"), 26, 240}, |
305 {bits32("11111111111111111110011010000000"), 25, 241}, | 305 {bits32("11111111111111111111110011000000"), 27, 241}, |
306 {bits32("11111111111111111110011100000000"), 25, 242}, | 306 {bits32("11111111111111111111101100000000"), 26, 242}, |
307 {bits32("11111111111111111110011110000000"), 25, 243}, | 307 {bits32("11111111111111111111101101000000"), 26, 243}, |
308 {bits32("11111111111111111110100000000000"), 25, 244}, | 308 {bits32("11111111111111111111110011100000"), 27, 244}, |
309 {bits32("11111111111111111110100010000000"), 25, 245}, | 309 {bits32("11111111111111111111110100000000"), 27, 245}, |
310 {bits32("11111111111111111110100100000000"), 25, 246}, | 310 {bits32("11111111111111111111110100100000"), 27, 246}, |
311 {bits32("11111111111111111110100110000000"), 25, 247}, | 311 {bits32("11111111111111111111110101000000"), 27, 247}, |
312 {bits32("11111111111111111110101000000000"), 25, 248}, | 312 {bits32("11111111111111111111110101100000"), 27, 248}, |
313 {bits32("11111111111111111110101010000000"), 25, 249}, | 313 {bits32("11111111111111111111111111100000"), 28, 249}, |
314 {bits32("11111111111111111110101100000000"), 25, 250}, | 314 {bits32("11111111111111111111110110000000"), 27, 250}, |
315 {bits32("11111111111111111110101110000000"), 25, 251}, | 315 {bits32("11111111111111111111110110100000"), 27, 251}, |
316 {bits32("11111111111111111110110000000000"), 25, 252}, | 316 {bits32("11111111111111111111110111000000"), 27, 252}, |
317 {bits32("11111111111111111110110010000000"), 25, 253}, | 317 {bits32("11111111111111111111110111100000"), 27, 253}, |
318 {bits32("11111111111111111110110100000000"), 25, 254}, | 318 {bits32("11111111111111111111111000000000"), 27, 254}, |
319 {bits32("11111111111111111110110110000000"), 25, 255}, | 319 {bits32("11111111111111111111101110000000"), 26, 255}, |
320 {bits32("11111111111111111110111000000000"), 25, 256}, // EOS | 320 {bits32("11111111111111111111111111111100"), 30, 256}, // EOS |
321 }; | 321 }; |
322 return std::vector<HpackHuffmanSymbol>( | 322 return std::vector<HpackHuffmanSymbol>( |
323 kHpackHuffmanCode, | 323 kHpackHuffmanCode, |
324 kHpackHuffmanCode + arraysize(kHpackHuffmanCode)); | 324 kHpackHuffmanCode + arraysize(kHpackHuffmanCode)); |
325 } | 325 } |
326 | 326 |
327 const HpackHuffmanTable& ObtainHpackHuffmanTable() { | 327 const HpackHuffmanTable& ObtainHpackHuffmanTable() { |
328 return *SharedHpackHuffmanTable::GetInstance()->table; | 328 return *SharedHpackHuffmanTable::GetInstance()->table; |
329 } | 329 } |
330 | 330 |
331 } // namespace net | 331 } // namespace net |
OLD | NEW |