23 using std::unique_ptr;
30 vector<Header>& headers) {
32 std::pair<vector<HPACKHeader>,
uint32_t> converted;
33 converted.first.reserve(headers.size());
34 for (
const auto&
h : headers) {
36 converted.first.emplace_back(*
h.name, *
h.value);
37 auto& header = converted.first.back();
38 converted.second += header.name.size() + header.value.size() + 2;
46 decoder_(HPACK::
kTableSize, maxUncompressed_) {}
71 streamingCb->stats =
stats_;
76 stream <<
"DecoderTable:\n" <<
decoder_;
77 stream <<
"EncoderTable:\n" <<
encoder_;
const uint32_t kTableSize
void recordCompressedSize(const folly::IOBuf *buf)
void decodeStreaming(folly::io::Cursor &cursor, uint32_t length, HPACK::StreamingCallback *streamingCb) noexcept
std::ostream & operator<<(std::ostream &os, const HeaderTable &table)
void describe(std::ostream &os) const
requires E e noexcept(noexcept(s.error(std::move(e))))
std::pair< vector< HPACKHeader >, uint32_t > prepareHeaders(vector< Header > &headers)
std::deque< HeaderPiece > HeaderPieceList
void decodeStreaming(folly::io::Cursor &cursor, uint32_t totalBytes, HPACK::StreamingCallback *streamingCb)
std::unique_ptr< folly::IOBuf > encode(const std::vector< HPACKHeader > &headers, uint32_t headroom=0)
std::size_t computeChainDataLength() const
std::unique_ptr< folly::IOBuf > encode(std::vector< compress::Header > &headers) noexcept
HPACKCodec(TransportDirection direction)