diff options
author | jgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 22:44:20 +0000 |
---|---|---|
committer | jgraettinger@chromium.org <jgraettinger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 22:44:20 +0000 |
commit | e99d1287191bfdaad3448b7080b46ae39fb6c97a (patch) | |
tree | 698ac0b24d0fcb795aa08cc5ab18f61dda751616 /net/spdy/hpack_output_stream.h | |
parent | 630e8545ebed7170f0b0d263c9312a0594710a58 (diff) | |
download | chromium_src-e99d1287191bfdaad3448b7080b46ae39fb6c97a.zip chromium_src-e99d1287191bfdaad3448b7080b46ae39fb6c97a.tar.gz chromium_src-e99d1287191bfdaad3448b7080b46ae39fb6c97a.tar.bz2 |
Implement a minimal decoder for HPACK (HTTP/2 compression)
The decoder assumes everything is encoded as literals without indexing and does
not use Huffman encoding.
The decoder will be expanded to handle everything in the spec in future CLs.
This lands server change 60496510 by akalin.
BUG=339578
Review URL: https://codereview.chromium.org/150453002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248064 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, 8 insertions, 4 deletions
diff --git a/net/spdy/hpack_output_stream.h b/net/spdy/hpack_output_stream.h index f041171..f82ec92 100644 --- a/net/spdy/hpack_output_stream.h +++ b/net/spdy/hpack_output_stream.h @@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/strings/string_piece.h" #include "net/base/net_export.h" +#include "net/spdy/hpack_constants.h" // For HpackPrefix. #include "net/spdy/hpack_encoding_context.h" // All section references below are to @@ -54,11 +55,14 @@ class NET_EXPORT_PRIVATE HpackOutputStream { } private: - // Appends the lower |size| bits of |bits| to the internal buffer. + // Appends the lower |bit_size| bits of |bits| to the internal buffer. // - // |size| must be > 0 and <= 8. |bits| must not have any bits set - // |other than the lower |size| bits. - void AppendBits(uint8 bits, size_t size); + // |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); // Appends the given integer using the representation described in // 4.1.1. If the internal buffer ends on a byte boundary, the prefix |