QUICHE team | fd50a40 | 2018-12-07 22:54:05 -0500 | [diff] [blame] | 1 | // Copyright (c) 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_HTTP2_HPACK_HUFFMAN_HUFFMAN_SPEC_TABLES_H_ |
| 6 | #define QUICHE_HTTP2_HPACK_HUFFMAN_HUFFMAN_SPEC_TABLES_H_ |
| 7 | |
| 8 | // Tables describing the Huffman encoding of bytes as specified by RFC7541. |
| 9 | |
| 10 | #include <cstdint> |
| 11 | |
| 12 | namespace http2 { |
| 13 | |
| 14 | struct HuffmanSpecTables { |
| 15 | // Number of bits in the encoding of each symbol (byte). |
| 16 | static const uint8_t kCodeLengths[257]; |
| 17 | |
| 18 | // The encoding of each symbol, right justified (as printed), which means that |
| 19 | // the last bit of the encoding is the low-order bit of the uint32. |
| 20 | static const uint32_t kRightCodes[257]; |
bnc | 0f73a76 | 2020-10-02 13:51:02 -0700 | [diff] [blame] | 21 | |
| 22 | // The encoding of each symbol, left justified (as printed), which means that |
| 23 | // the first bit of the encoding is the high-order bit of the uint32. |
| 24 | static const uint32_t kLeftCodes[257]; |
QUICHE team | fd50a40 | 2018-12-07 22:54:05 -0500 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | } // namespace http2 |
| 28 | |
| 29 | #endif // QUICHE_HTTP2_HPACK_HUFFMAN_HUFFMAN_SPEC_TABLES_H_ |