/* kHashMul32 multiplier has these properties: *Themultipliermustbeodd.Otherwisewemaylosethehighestbit. *Nolongstreaksofonesorzeros. *Thereisnoefforttoensurethatitisaprime,theoddityisenough forthisuse.
* The number has been tuned heuristically against compression benchmarks. */ staticconst uint32_t kHashMul32 = 0x1E35A7BD; staticconst uint64_t kHashMul64 =
BROTLI_MAKE_UINT64_T(0x1FE35A7Bu, 0xD3579BD3u);
static BROTLI_INLINE uint32_t Hash14(const uint8_t* data) {
uint32_t h = BROTLI_UNALIGNED_LOAD32LE(data) * kHashMul32; /* The higher bits contain more mixture from the multiplication,
so we take our results from there. */ return h >> (32 - 14);
}
static BROTLI_INLINE uint32_t Hash15(const uint8_t* data) {
uint32_t h = BROTLI_UNALIGNED_LOAD32LE(data) * kHashMul32; /* The higher bits contain more mixture from the multiplication,
so we take our results from there. */ return h >> (32 - 15);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.