Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: net/spdy/http2_compressor.h

Issue 22074002: DO NOT COMMIT: Implement HPACK (draft 03) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for httpbis-draft-06 / hpack-draft-03 Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/net.gyp ('k') | net/spdy/http2_compressor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 NET_SPDY_HTTP2_COMPRESSOR_H_
6 #define NET_SPDY_HTTP2_COMPRESSOR_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/strings/string_piece.h"
12 #include "net/base/net_export.h"
13 #include "net/spdy/http2_encoding_context.h"
14 #include "net/spdy/spdy_protocol.h"
15
16 namespace net {
17
18 class Http2Encoder {
19 public:
20 Http2Encoder();
21
22 void EncodeOctet(uint8 octet);
23
24 void EncodeInteger(uint8 op_code, uint8 N, uint32 I);
25
26 void EncodeOctetSequence(base::StringPiece str);
27
28 void EncodeIndexedHeader(uint32 index);
29
30 void EncodeLiteralHeaderNoIndexingWithIndex(uint32 index,
31 base::StringPiece value);
32
33 void EncodeLiteralHeaderNoIndexingWithName(base::StringPiece name,
34 base::StringPiece value);
35
36 void EncodeLiteralHeaderWithIncrementalIndexingWithIndex(
37 uint32 index,
38 base::StringPiece value);
39
40 void EncodeLiteralHeaderWithIncrementalIndexingWithName(
41 base::StringPiece name,
42 base::StringPiece value);
43
44 void EncodeLiteralHeaderWithSubstitutionIndexingWithIndex(
45 uint32 index,
46 base::StringPiece value);
47
48 void EncodeLiteralHeaderWithSubstitutionIndexingWithName(
49 base::StringPiece name,
50 base::StringPiece value);
51
52 std::string Flush();
53
54 private:
55 std::string buffer_;
56
57 DISALLOW_COPY_AND_ASSIGN(Http2Encoder);
58 };
59
60 class NET_EXPORT_PRIVATE Http2Compressor {
61 public:
62 Http2Compressor();
63 ~Http2Compressor();
64
65 std::string EncodeNameValueBlock(const SpdyNameValueBlock& name_value_block);
66
67 private:
68 EncodingContext encoding_context_;
69
70 DISALLOW_COPY_AND_ASSIGN(Http2Compressor);
71 };
72
73 } // namespace net
74
75 #endif // NET_SPDY_HTTP2_COMPRESSOR_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/spdy/http2_compressor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698