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

Unified Diff: net/spdy/hpack/hpack_huffman_table.h

Issue 1568423002: Implement better HPACK Huffman code decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not use binary literals. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_huffman_decoder_test.cc ('k') | net/spdy/hpack/hpack_huffman_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_huffman_table.h
diff --git a/net/spdy/hpack/hpack_huffman_table.h b/net/spdy/hpack/hpack_huffman_table.h
index 566271503c5895c7de09bdd4263931df08db30ba..6fd60e43d3985cd5be6fc3cd667ce44f8f4e120f 100644
--- a/net/spdy/hpack/hpack_huffman_table.h
+++ b/net/spdy/hpack/hpack_huffman_table.h
@@ -82,14 +82,18 @@ class NET_EXPORT_PRIVATE HpackHuffmanTable {
// Returns the encoded size of the input string.
size_t EncodedSize(base::StringPiece in) const;
- // Decodes symbols from |in| into |out|. It is the caller's responsibility
- // to ensure |out| has a reserved a sufficient buffer to hold decoded output.
- // DecodeString() halts when |in| runs out of input, in which case true is
- // returned. It also halts (returning false) if an invalid Huffman code
- // prefix is read, or if |out_capacity| would otherwise be overflowed.
- bool DecodeString(HpackInputStream* in,
- size_t out_capacity,
- std::string* out) const;
+ // Decodes symbols from |in| into |out|, using the support for generic (any)
+ // huffman tables, not just those defined in the HPACK spec. It is the
+ // caller's responsibility to ensure |out| has reserved a sufficient buffer to
+ // hold decoded output. GenericDecodeString() halts when |in| runs out of
+ // input, in which case true is returned. It also halts (returning false) if
+ // an invalid Huffman code prefix is read, or if |out_capacity| would
+ // otherwise be overflowed.
+ // DEPRECATED: HpackHuffmanDecoder is now used for decoding strings encoded
+ // according to the Huffman Table in the HPACK spec.
+ bool GenericDecodeString(HpackInputStream* in,
+ size_t out_capacity,
+ std::string* out) const;
private:
// Expects symbols ordered on length & ID ascending.
« no previous file with comments | « net/spdy/hpack/hpack_huffman_decoder_test.cc ('k') | net/spdy/hpack/hpack_huffman_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698