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

Side by Side Diff: third_party/brotli/enc/static_dict.h

Issue 2537133002: Update brotli to v1.0.0-snapshot. (Closed)
Patch Set: Fixed typo Created 4 years 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 | « third_party/brotli/enc/ringbuffer.h ('k') | third_party/brotli/enc/static_dict.c » ('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 2013 Google Inc. All Rights Reserved. 1 /* Copyright 2013 Google Inc. All Rights Reserved.
2 2
3 Distributed under MIT license. 3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */ 5 */
6 6
7 // Class to model the static dictionary. 7 /* Class to model the static dictionary. */
8 8
9 #ifndef BROTLI_ENC_STATIC_DICT_H_ 9 #ifndef BROTLI_ENC_STATIC_DICT_H_
10 #define BROTLI_ENC_STATIC_DICT_H_ 10 #define BROTLI_ENC_STATIC_DICT_H_
11 11
12 #include "./types.h" 12 #include <brotli/types.h>
13 #include "./port.h"
13 14
14 namespace brotli { 15 #if defined(__cplusplus) || defined(c_plusplus)
16 extern "C" {
17 #endif
15 18
16 static const size_t kMaxDictionaryMatchLen = 37; 19 #define BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN 37
17 static const uint32_t kInvalidMatch = 0xfffffff; 20 static const uint32_t kInvalidMatch = 0xfffffff;
18 21
19 // Matches data against static dictionary words, and for each length l, 22 /* Matches data against static dictionary words, and for each length l,
20 // for which a match is found, updates matches[l] to be the minimum possible 23 for which a match is found, updates matches[l] to be the minimum possible
21 // (distance << 5) + len_code. 24 (distance << 5) + len_code.
22 // Prerequisites: 25 Returns 1 if matches have been found, otherwise 0.
23 // matches array is at least kMaxDictionaryMatchLen + 1 long 26 Prerequisites:
24 // all elements are initialized to kInvalidMatch 27 matches array is at least BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1 long
25 bool FindAllStaticDictionaryMatches(const uint8_t* data, 28 all elements are initialized to kInvalidMatch */
26 size_t min_length, 29 BROTLI_INTERNAL BROTLI_BOOL BrotliFindAllStaticDictionaryMatches(
27 size_t max_length, 30 const uint8_t* data, size_t min_length, size_t max_length,
28 uint32_t* matches); 31 uint32_t* matches);
29 32
30 } // namespace brotli 33 #if defined(__cplusplus) || defined(c_plusplus)
34 } /* extern "C" */
35 #endif
31 36
32 #endif // BROTLI_ENC_STATIC_DICT_H_ 37 #endif /* BROTLI_ENC_STATIC_DICT_H_ */
OLDNEW
« no previous file with comments | « third_party/brotli/enc/ringbuffer.h ('k') | third_party/brotli/enc/static_dict.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698