nnoble | 0c475f0 | 2014-12-05 15:37:39 -0800 | [diff] [blame] | 1 | /* |
| 2 | * |
Craig Tiller | 2e19036 | 2016-03-25 14:33:26 -0700 | [diff] [blame] | 3 | * Copyright 2015-2016, Google Inc. |
nnoble | 0c475f0 | 2014-12-05 15:37:39 -0800 | [diff] [blame] | 4 | * All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions are |
| 8 | * met: |
| 9 | * |
| 10 | * * Redistributions of source code must retain the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer. |
| 12 | * * Redistributions in binary form must reproduce the above |
| 13 | * copyright notice, this list of conditions and the following disclaimer |
| 14 | * in the documentation and/or other materials provided with the |
| 15 | * distribution. |
| 16 | * * Neither the name of Google Inc. nor the names of its |
| 17 | * contributors may be used to endorse or promote products derived from |
| 18 | * this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | * |
| 32 | */ |
| 33 | |
| 34 | #include "src/core/transport/chttp2/huffsyms.h" |
| 35 | |
| 36 | /* Constants pulled from the HPACK spec, and converted to C using the vim |
| 37 | command: |
| 38 | :%s/.* \([0-9a-f]\+\) \[ *\([0-9]\+\)\]/{0x\1, \2},/g */ |
| 39 | const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS] = { |
Craig Tiller | f40df23 | 2016-03-25 13:38:14 -0700 | [diff] [blame] | 40 | {0x1ff8, 13}, {0x7fffd8, 23}, {0xfffffe2, 28}, {0xfffffe3, 28}, |
| 41 | {0xfffffe4, 28}, {0xfffffe5, 28}, {0xfffffe6, 28}, {0xfffffe7, 28}, |
| 42 | {0xfffffe8, 28}, {0xffffea, 24}, {0x3ffffffc, 30}, {0xfffffe9, 28}, |
| 43 | {0xfffffea, 28}, {0x3ffffffd, 30}, {0xfffffeb, 28}, {0xfffffec, 28}, |
| 44 | {0xfffffed, 28}, {0xfffffee, 28}, {0xfffffef, 28}, {0xffffff0, 28}, |
| 45 | {0xffffff1, 28}, {0xffffff2, 28}, {0x3ffffffe, 30}, {0xffffff3, 28}, |
| 46 | {0xffffff4, 28}, {0xffffff5, 28}, {0xffffff6, 28}, {0xffffff7, 28}, |
| 47 | {0xffffff8, 28}, {0xffffff9, 28}, {0xffffffa, 28}, {0xffffffb, 28}, |
| 48 | {0x14, 6}, {0x3f8, 10}, {0x3f9, 10}, {0xffa, 12}, |
| 49 | {0x1ff9, 13}, {0x15, 6}, {0xf8, 8}, {0x7fa, 11}, |
| 50 | {0x3fa, 10}, {0x3fb, 10}, {0xf9, 8}, {0x7fb, 11}, |
| 51 | {0xfa, 8}, {0x16, 6}, {0x17, 6}, {0x18, 6}, |
| 52 | {0x0, 5}, {0x1, 5}, {0x2, 5}, {0x19, 6}, |
| 53 | {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6}, |
| 54 | {0x1e, 6}, {0x1f, 6}, {0x5c, 7}, {0xfb, 8}, |
| 55 | {0x7ffc, 15}, {0x20, 6}, {0xffb, 12}, {0x3fc, 10}, |
| 56 | {0x1ffa, 13}, {0x21, 6}, {0x5d, 7}, {0x5e, 7}, |
| 57 | {0x5f, 7}, {0x60, 7}, {0x61, 7}, {0x62, 7}, |
| 58 | {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, |
| 59 | {0x67, 7}, {0x68, 7}, {0x69, 7}, {0x6a, 7}, |
| 60 | {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, {0x6e, 7}, |
| 61 | {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, |
| 62 | {0xfc, 8}, {0x73, 7}, {0xfd, 8}, {0x1ffb, 13}, |
| 63 | {0x7fff0, 19}, {0x1ffc, 13}, {0x3ffc, 14}, {0x22, 6}, |
| 64 | {0x7ffd, 15}, {0x3, 5}, {0x23, 6}, {0x4, 5}, |
| 65 | {0x24, 6}, {0x5, 5}, {0x25, 6}, {0x26, 6}, |
| 66 | {0x27, 6}, {0x6, 5}, {0x74, 7}, {0x75, 7}, |
| 67 | {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, |
| 68 | {0x2b, 6}, {0x76, 7}, {0x2c, 6}, {0x8, 5}, |
| 69 | {0x9, 5}, {0x2d, 6}, {0x77, 7}, {0x78, 7}, |
| 70 | {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x7ffe, 15}, |
| 71 | {0x7fc, 11}, {0x3ffd, 14}, {0x1ffd, 13}, {0xffffffc, 28}, |
| 72 | {0xfffe6, 20}, {0x3fffd2, 22}, {0xfffe7, 20}, {0xfffe8, 20}, |
| 73 | {0x3fffd3, 22}, {0x3fffd4, 22}, {0x3fffd5, 22}, {0x7fffd9, 23}, |
| 74 | {0x3fffd6, 22}, {0x7fffda, 23}, {0x7fffdb, 23}, {0x7fffdc, 23}, |
| 75 | {0x7fffdd, 23}, {0x7fffde, 23}, {0xffffeb, 24}, {0x7fffdf, 23}, |
| 76 | {0xffffec, 24}, {0xffffed, 24}, {0x3fffd7, 22}, {0x7fffe0, 23}, |
| 77 | {0xffffee, 24}, {0x7fffe1, 23}, {0x7fffe2, 23}, {0x7fffe3, 23}, |
| 78 | {0x7fffe4, 23}, {0x1fffdc, 21}, {0x3fffd8, 22}, {0x7fffe5, 23}, |
| 79 | {0x3fffd9, 22}, {0x7fffe6, 23}, {0x7fffe7, 23}, {0xffffef, 24}, |
| 80 | {0x3fffda, 22}, {0x1fffdd, 21}, {0xfffe9, 20}, {0x3fffdb, 22}, |
| 81 | {0x3fffdc, 22}, {0x7fffe8, 23}, {0x7fffe9, 23}, {0x1fffde, 21}, |
| 82 | {0x7fffea, 23}, {0x3fffdd, 22}, {0x3fffde, 22}, {0xfffff0, 24}, |
| 83 | {0x1fffdf, 21}, {0x3fffdf, 22}, {0x7fffeb, 23}, {0x7fffec, 23}, |
| 84 | {0x1fffe0, 21}, {0x1fffe1, 21}, {0x3fffe0, 22}, {0x1fffe2, 21}, |
| 85 | {0x7fffed, 23}, {0x3fffe1, 22}, {0x7fffee, 23}, {0x7fffef, 23}, |
| 86 | {0xfffea, 20}, {0x3fffe2, 22}, {0x3fffe3, 22}, {0x3fffe4, 22}, |
| 87 | {0x7ffff0, 23}, {0x3fffe5, 22}, {0x3fffe6, 22}, {0x7ffff1, 23}, |
| 88 | {0x3ffffe0, 26}, {0x3ffffe1, 26}, {0xfffeb, 20}, {0x7fff1, 19}, |
| 89 | {0x3fffe7, 22}, {0x7ffff2, 23}, {0x3fffe8, 22}, {0x1ffffec, 25}, |
| 90 | {0x3ffffe2, 26}, {0x3ffffe3, 26}, {0x3ffffe4, 26}, {0x7ffffde, 27}, |
| 91 | {0x7ffffdf, 27}, {0x3ffffe5, 26}, {0xfffff1, 24}, {0x1ffffed, 25}, |
| 92 | {0x7fff2, 19}, {0x1fffe3, 21}, {0x3ffffe6, 26}, {0x7ffffe0, 27}, |
| 93 | {0x7ffffe1, 27}, {0x3ffffe7, 26}, {0x7ffffe2, 27}, {0xfffff2, 24}, |
| 94 | {0x1fffe4, 21}, {0x1fffe5, 21}, {0x3ffffe8, 26}, {0x3ffffe9, 26}, |
| 95 | {0xffffffd, 28}, {0x7ffffe3, 27}, {0x7ffffe4, 27}, {0x7ffffe5, 27}, |
| 96 | {0xfffec, 20}, {0xfffff3, 24}, {0xfffed, 20}, {0x1fffe6, 21}, |
| 97 | {0x3fffe9, 22}, {0x1fffe7, 21}, {0x1fffe8, 21}, {0x7ffff3, 23}, |
| 98 | {0x3fffea, 22}, {0x3fffeb, 22}, {0x1ffffee, 25}, {0x1ffffef, 25}, |
| 99 | {0xfffff4, 24}, {0xfffff5, 24}, {0x3ffffea, 26}, {0x7ffff4, 23}, |
| 100 | {0x3ffffeb, 26}, {0x7ffffe6, 27}, {0x3ffffec, 26}, {0x3ffffed, 26}, |
| 101 | {0x7ffffe7, 27}, {0x7ffffe8, 27}, {0x7ffffe9, 27}, {0x7ffffea, 27}, |
| 102 | {0x7ffffeb, 27}, {0xffffffe, 28}, {0x7ffffec, 27}, {0x7ffffed, 27}, |
| 103 | {0x7ffffee, 27}, {0x7ffffef, 27}, {0x7fffff0, 27}, {0x3ffffee, 26}, |
Craig Tiller | 4aa71a1 | 2015-06-15 13:00:55 -0700 | [diff] [blame] | 104 | {0x3fffffff, 30}, |
| 105 | }; |