h2lean 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,333 @@
1
+ // GENERATED by tools/gen-hpack-data.js -- do not edit.
2
+ // RFC 7541 Appendix A (static table) and Appendix B (Huffman codes), transcribed
3
+ // mechanically from nghttp2's generated C tables (MIT, (c) Tatsuhiro Tsujikawa).
4
+ 'use strict';
5
+
6
+ const STATIC = [
7
+ [':authority', ''],
8
+ [':method', 'GET'],
9
+ [':method', 'POST'],
10
+ [':path', '/'],
11
+ [':path', '/index.html'],
12
+ [':scheme', 'http'],
13
+ [':scheme', 'https'],
14
+ [':status', '200'],
15
+ [':status', '204'],
16
+ [':status', '206'],
17
+ [':status', '304'],
18
+ [':status', '400'],
19
+ [':status', '404'],
20
+ [':status', '500'],
21
+ ['accept-charset', ''],
22
+ ['accept-encoding', 'gzip, deflate'],
23
+ ['accept-language', ''],
24
+ ['accept-ranges', ''],
25
+ ['accept', ''],
26
+ ['access-control-allow-origin', ''],
27
+ ['age', ''],
28
+ ['allow', ''],
29
+ ['authorization', ''],
30
+ ['cache-control', ''],
31
+ ['content-disposition', ''],
32
+ ['content-encoding', ''],
33
+ ['content-language', ''],
34
+ ['content-length', ''],
35
+ ['content-location', ''],
36
+ ['content-range', ''],
37
+ ['content-type', ''],
38
+ ['cookie', ''],
39
+ ['date', ''],
40
+ ['etag', ''],
41
+ ['expect', ''],
42
+ ['expires', ''],
43
+ ['from', ''],
44
+ ['host', ''],
45
+ ['if-match', ''],
46
+ ['if-modified-since', ''],
47
+ ['if-none-match', ''],
48
+ ['if-range', ''],
49
+ ['if-unmodified-since', ''],
50
+ ['last-modified', ''],
51
+ ['link', ''],
52
+ ['location', ''],
53
+ ['max-forwards', ''],
54
+ ['proxy-authenticate', ''],
55
+ ['proxy-authorization', ''],
56
+ ['range', ''],
57
+ ['referer', ''],
58
+ ['refresh', ''],
59
+ ['retry-after', ''],
60
+ ['server', ''],
61
+ ['set-cookie', ''],
62
+ ['strict-transport-security', ''],
63
+ ['transfer-encoding', ''],
64
+ ['user-agent', ''],
65
+ ['vary', ''],
66
+ ['via', ''],
67
+ ['www-authenticate', '']
68
+ ];
69
+
70
+ // index 0..255 = octet, 256 = EOS
71
+ const HUFF_BITS = new Uint8Array([13,23,28,28,28,28,28,28,28,24,30,28,28,30,28,28,28,28,28,28,28,28,30,28,28,28,28,28,28,28,28,28,6,10,10,12,13,6,8,11,10,10,8,11,8,6,6,6,5,5,5,6,6,6,6,6,6,6,7,8,15,6,12,10,13,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,7,8,13,19,13,14,6,15,5,6,5,6,5,6,6,6,5,7,7,6,6,6,5,6,7,6,5,5,6,7,7,7,7,7,15,11,14,13,28,20,22,20,20,22,22,22,23,22,23,23,23,23,23,24,23,24,24,22,23,24,23,23,23,23,21,22,23,22,23,23,24,22,21,20,22,22,23,23,21,23,22,22,24,21,22,23,23,21,21,22,21,23,22,23,23,20,22,22,22,23,22,22,23,26,26,20,19,22,23,22,25,26,26,26,27,27,26,24,25,19,21,26,27,27,26,27,24,21,21,26,26,28,27,27,27,20,24,20,21,22,21,21,23,22,22,25,25,24,24,26,23,26,27,26,26,27,27,27,27,27,28,27,27,27,27,27,26,30]);
72
+
73
+ const HUFF_CODES = new Uint32Array([
74
+ 0x1ff8,
75
+ 0x7fffd8,
76
+ 0xfffffe2,
77
+ 0xfffffe3,
78
+ 0xfffffe4,
79
+ 0xfffffe5,
80
+ 0xfffffe6,
81
+ 0xfffffe7,
82
+ 0xfffffe8,
83
+ 0xffffea,
84
+ 0x3ffffffc,
85
+ 0xfffffe9,
86
+ 0xfffffea,
87
+ 0x3ffffffd,
88
+ 0xfffffeb,
89
+ 0xfffffec,
90
+ 0xfffffed,
91
+ 0xfffffee,
92
+ 0xfffffef,
93
+ 0xffffff0,
94
+ 0xffffff1,
95
+ 0xffffff2,
96
+ 0x3ffffffe,
97
+ 0xffffff3,
98
+ 0xffffff4,
99
+ 0xffffff5,
100
+ 0xffffff6,
101
+ 0xffffff7,
102
+ 0xffffff8,
103
+ 0xffffff9,
104
+ 0xffffffa,
105
+ 0xffffffb,
106
+ 0x14,
107
+ 0x3f8,
108
+ 0x3f9,
109
+ 0xffa,
110
+ 0x1ff9,
111
+ 0x15,
112
+ 0xf8,
113
+ 0x7fa,
114
+ 0x3fa,
115
+ 0x3fb,
116
+ 0xf9,
117
+ 0x7fb,
118
+ 0xfa,
119
+ 0x16,
120
+ 0x17,
121
+ 0x18,
122
+ 0x0,
123
+ 0x1,
124
+ 0x2,
125
+ 0x19,
126
+ 0x1a,
127
+ 0x1b,
128
+ 0x1c,
129
+ 0x1d,
130
+ 0x1e,
131
+ 0x1f,
132
+ 0x5c,
133
+ 0xfb,
134
+ 0x7ffc,
135
+ 0x20,
136
+ 0xffb,
137
+ 0x3fc,
138
+ 0x1ffa,
139
+ 0x21,
140
+ 0x5d,
141
+ 0x5e,
142
+ 0x5f,
143
+ 0x60,
144
+ 0x61,
145
+ 0x62,
146
+ 0x63,
147
+ 0x64,
148
+ 0x65,
149
+ 0x66,
150
+ 0x67,
151
+ 0x68,
152
+ 0x69,
153
+ 0x6a,
154
+ 0x6b,
155
+ 0x6c,
156
+ 0x6d,
157
+ 0x6e,
158
+ 0x6f,
159
+ 0x70,
160
+ 0x71,
161
+ 0x72,
162
+ 0xfc,
163
+ 0x73,
164
+ 0xfd,
165
+ 0x1ffb,
166
+ 0x7fff0,
167
+ 0x1ffc,
168
+ 0x3ffc,
169
+ 0x22,
170
+ 0x7ffd,
171
+ 0x3,
172
+ 0x23,
173
+ 0x4,
174
+ 0x24,
175
+ 0x5,
176
+ 0x25,
177
+ 0x26,
178
+ 0x27,
179
+ 0x6,
180
+ 0x74,
181
+ 0x75,
182
+ 0x28,
183
+ 0x29,
184
+ 0x2a,
185
+ 0x7,
186
+ 0x2b,
187
+ 0x76,
188
+ 0x2c,
189
+ 0x8,
190
+ 0x9,
191
+ 0x2d,
192
+ 0x77,
193
+ 0x78,
194
+ 0x79,
195
+ 0x7a,
196
+ 0x7b,
197
+ 0x7ffe,
198
+ 0x7fc,
199
+ 0x3ffd,
200
+ 0x1ffd,
201
+ 0xffffffc,
202
+ 0xfffe6,
203
+ 0x3fffd2,
204
+ 0xfffe7,
205
+ 0xfffe8,
206
+ 0x3fffd3,
207
+ 0x3fffd4,
208
+ 0x3fffd5,
209
+ 0x7fffd9,
210
+ 0x3fffd6,
211
+ 0x7fffda,
212
+ 0x7fffdb,
213
+ 0x7fffdc,
214
+ 0x7fffdd,
215
+ 0x7fffde,
216
+ 0xffffeb,
217
+ 0x7fffdf,
218
+ 0xffffec,
219
+ 0xffffed,
220
+ 0x3fffd7,
221
+ 0x7fffe0,
222
+ 0xffffee,
223
+ 0x7fffe1,
224
+ 0x7fffe2,
225
+ 0x7fffe3,
226
+ 0x7fffe4,
227
+ 0x1fffdc,
228
+ 0x3fffd8,
229
+ 0x7fffe5,
230
+ 0x3fffd9,
231
+ 0x7fffe6,
232
+ 0x7fffe7,
233
+ 0xffffef,
234
+ 0x3fffda,
235
+ 0x1fffdd,
236
+ 0xfffe9,
237
+ 0x3fffdb,
238
+ 0x3fffdc,
239
+ 0x7fffe8,
240
+ 0x7fffe9,
241
+ 0x1fffde,
242
+ 0x7fffea,
243
+ 0x3fffdd,
244
+ 0x3fffde,
245
+ 0xfffff0,
246
+ 0x1fffdf,
247
+ 0x3fffdf,
248
+ 0x7fffeb,
249
+ 0x7fffec,
250
+ 0x1fffe0,
251
+ 0x1fffe1,
252
+ 0x3fffe0,
253
+ 0x1fffe2,
254
+ 0x7fffed,
255
+ 0x3fffe1,
256
+ 0x7fffee,
257
+ 0x7fffef,
258
+ 0xfffea,
259
+ 0x3fffe2,
260
+ 0x3fffe3,
261
+ 0x3fffe4,
262
+ 0x7ffff0,
263
+ 0x3fffe5,
264
+ 0x3fffe6,
265
+ 0x7ffff1,
266
+ 0x3ffffe0,
267
+ 0x3ffffe1,
268
+ 0xfffeb,
269
+ 0x7fff1,
270
+ 0x3fffe7,
271
+ 0x7ffff2,
272
+ 0x3fffe8,
273
+ 0x1ffffec,
274
+ 0x3ffffe2,
275
+ 0x3ffffe3,
276
+ 0x3ffffe4,
277
+ 0x7ffffde,
278
+ 0x7ffffdf,
279
+ 0x3ffffe5,
280
+ 0xfffff1,
281
+ 0x1ffffed,
282
+ 0x7fff2,
283
+ 0x1fffe3,
284
+ 0x3ffffe6,
285
+ 0x7ffffe0,
286
+ 0x7ffffe1,
287
+ 0x3ffffe7,
288
+ 0x7ffffe2,
289
+ 0xfffff2,
290
+ 0x1fffe4,
291
+ 0x1fffe5,
292
+ 0x3ffffe8,
293
+ 0x3ffffe9,
294
+ 0xffffffd,
295
+ 0x7ffffe3,
296
+ 0x7ffffe4,
297
+ 0x7ffffe5,
298
+ 0xfffec,
299
+ 0xfffff3,
300
+ 0xfffed,
301
+ 0x1fffe6,
302
+ 0x3fffe9,
303
+ 0x1fffe7,
304
+ 0x1fffe8,
305
+ 0x7ffff3,
306
+ 0x3fffea,
307
+ 0x3fffeb,
308
+ 0x1ffffee,
309
+ 0x1ffffef,
310
+ 0xfffff4,
311
+ 0xfffff5,
312
+ 0x3ffffea,
313
+ 0x7ffff4,
314
+ 0x3ffffeb,
315
+ 0x7ffffe6,
316
+ 0x3ffffec,
317
+ 0x3ffffed,
318
+ 0x7ffffe7,
319
+ 0x7ffffe8,
320
+ 0x7ffffe9,
321
+ 0x7ffffea,
322
+ 0x7ffffeb,
323
+ 0xffffffe,
324
+ 0x7ffffec,
325
+ 0x7ffffed,
326
+ 0x7ffffee,
327
+ 0x7ffffef,
328
+ 0x7fffff0,
329
+ 0x3ffffee,
330
+ 0x3fffffff
331
+ ]);
332
+
333
+ module.exports = { STATIC, HUFF_BITS, HUFF_CODES };