diff options
author | jgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 02:12:33 +0000 |
---|---|---|
committer | jgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 02:12:33 +0000 |
commit | 9ee6a23fcc1677b81e90b75f85f65938c39f9c74 (patch) | |
tree | 2c32cf39d492f38c25e1fd77e07431c6bb8117aa /net/spdy/hpack_output_stream.h | |
parent | 782510f326cbad4d6e8a0e2a4a49c86e61111cd5 (diff) | |
download | chromium_src-9ee6a23fcc1677b81e90b75f85f65938c39f9c74.zip chromium_src-9ee6a23fcc1677b81e90b75f85f65938c39f9c74.tar.gz chromium_src-9ee6a23fcc1677b81e90b75f85f65938c39f9c74.tar.bz2 |
Implement HPACK Huffman encoding & decoding.
Adds HpackHuffmanTable & tests, which is responsible for rebuilding
canonical Huffman codes from specified code lengths, and for
encoding and decoding strings using the constructed code.
This CL does not tie HpackHuffmanTable to HPACK opcodes. That'll happen next.
This lands server change 61755107 by jgraettinger.
BUG=339578
Review URL: https://codereview.chromium.org/181653003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/hpack_output_stream.h')
-rw-r--r-- | net/spdy/hpack_output_stream.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/spdy/hpack_output_stream.h b/net/spdy/hpack_output_stream.h index 7ad13e6..67c7739 100644 --- a/net/spdy/hpack_output_stream.h +++ b/net/spdy/hpack_output_stream.h @@ -43,6 +43,12 @@ class NET_EXPORT_PRIVATE HpackOutputStream { // internal state. void TakeString(std::string* output); + // Appends the lower |bit_size| bits of |bits| to the internal buffer. + // + // |bit_size| must be > 0 and <= 8. |bits| must not have any bits + // set other than the lower |bit_size| bits. + void AppendBits(uint8 bits, size_t bit_size); + // Accessors for testing. void AppendBitsForTest(uint8 bits, size_t size) { @@ -58,12 +64,6 @@ class NET_EXPORT_PRIVATE HpackOutputStream { } private: - // Appends the lower |bit_size| bits of |bits| to the internal buffer. - // - // |bit_size| must be > 0 and <= 8. |bits| must not have any bits - // set other than the lower |bit_size| bits. - void AppendBits(uint8 bits, size_t bit_size); - // Simply forwards to AppendBits(prefix.bits, prefix.bit-size). void AppendPrefix(HpackPrefix prefix); |