proxygen
HPACKDecoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
12 #include <folly/io/Cursor.h>
13 #include <folly/io/IOBuf.h>
19 
20 namespace proxygen {
21 
23  public HPACKContext {
24  public:
25  explicit HPACKDecoder(
26  uint32_t tableSize=HPACK::kTableSize,
28  : HPACKDecoderBase(tableSize, maxUncompressed),
29  HPACKContext(tableSize) {}
30 
36  uint32_t totalBytes,
37  HPACK::StreamingCallback* streamingCb);
38 
39  private:
40  bool isValid(uint32_t index);
41 
43  HPACK::StreamingCallback* streamingCb,
44  headers_t* emitted);
45 
47  HPACK::StreamingCallback* streamingCb,
48  headers_t* emitted);
49 
51  HPACK::StreamingCallback* streamingCb,
52  headers_t* emitted);
53 };
54 
55 }
const uint32_t kTableSize
std::vector< HPACKHeader > headers_t
static const uint32_t kMaxUncompressed
Definition: HeaderCodec.h:37
uint32_t decodeHeader(HPACKDecodeBuffer &dbuf, HPACK::StreamingCallback *streamingCb, headers_t *emitted)
uint32_t decodeIndexedHeader(HPACKDecodeBuffer &dbuf, HPACK::StreamingCallback *streamingCb, headers_t *emitted)
uint32_t decodeLiteralHeader(HPACKDecodeBuffer &dbuf, HPACK::StreamingCallback *streamingCb, headers_t *emitted)
void decodeStreaming(folly::io::Cursor &cursor, uint32_t totalBytes, HPACK::StreamingCallback *streamingCb)
HPACKDecoder(uint32_t tableSize=HPACK::kTableSize, uint32_t maxUncompressed=HeaderCodec::kMaxUncompressed)
Definition: HPACKDecoder.h:25
bool isValid(uint32_t index)