blob: 2986037ebc2af966b8295045cc78337ed26ec54a [file] [log] [blame]
/* Copyright 2013 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at
// Class to model the static dictionary.
#include "./types.h"
namespace brotli {
static const int kMaxDictionaryMatchLen = 37;
static const int kInvalidMatch = 0xfffffff;
// Matches data against static dictionary words, and for each length l,
// for which a match is found, updates matches[l] to be the minimum possible
// (distance << 5) + len_code.
// Prerequisites:
// matches array is at least kMaxDictionaryMatchLen + 1 long
// all elements are initialized to kInvalidMatch
bool FindAllStaticDictionaryMatches(const uint8_t* data,
int min_length,
int max_length,
int* matches);
} // namespace brotli