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

Side by Side Diff: net/spdy/core/hpack/hpack_huffman_decoder.h

Issue 2908763002: Change HpackHuffmanDecoder::CanonicalToSource() return type. (Closed)
Patch Set: Re: #15. Created 3 years, 7 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
« no previous file with comments | « no previous file | net/spdy/core/hpack/hpack_huffman_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_ 5 #ifndef NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_
6 #define NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_ 6 #define NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // corresponding canonical symbol. 50 // corresponding canonical symbol.
51 // Returns a value in the range [0, 256] (257 values). 256 is the EOS symbol, 51 // Returns a value in the range [0, 256] (257 values). 256 is the EOS symbol,
52 // which must not be explicitly encoded; the HPACK spec says that a decoder 52 // which must not be explicitly encoded; the HPACK spec says that a decoder
53 // must treat EOS as a decoding error. 53 // must treat EOS as a decoding error.
54 // Note that the canonical symbol is not the final value to be output because 54 // Note that the canonical symbol is not the final value to be output because
55 // the source symbols are not in descending probability order, so another 55 // the source symbols are not in descending probability order, so another
56 // translation is required (see CanonicalToSource below). 56 // translation is required (see CanonicalToSource below).
57 static HuffmanWord DecodeToCanonical(HuffmanCodeLength code_length, 57 static HuffmanWord DecodeToCanonical(HuffmanCodeLength code_length,
58 HuffmanWord bits); 58 HuffmanWord bits);
59 59
60 // Converts a canonical symbol to the source symbol (the char in the original 60 // Converts a canonical symbol to the source symbol (the octet in the original
61 // string that was encoded). 61 // string that was encoded).
62 static char CanonicalToSource(HuffmanWord canonical); 62 static uint8_t CanonicalToSource(HuffmanWord canonical);
63 }; 63 };
64 64
65 } // namespace net 65 } // namespace net
66 66
67 #endif // NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_ 67 #endif // NET_SPDY_CORE_HPACK_HPACK_HUFFMAN_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/core/hpack/hpack_huffman_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698