mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Update the H5
hasher to use the H6
's FN(STORE)
.
PiperOrigin-RevId: 623885589
This commit is contained in:
parent
f964a1e8ac
commit
a813a6a1e4
@ -104,11 +104,13 @@ static BROTLI_INLINE void FN(HashMemAllocInBytes)(
|
|||||||
static BROTLI_INLINE void FN(Store)(
|
static BROTLI_INLINE void FN(Store)(
|
||||||
HashLongestMatch* BROTLI_RESTRICT self, const uint8_t* BROTLI_RESTRICT data,
|
HashLongestMatch* BROTLI_RESTRICT self, const uint8_t* BROTLI_RESTRICT data,
|
||||||
const size_t mask, const size_t ix) {
|
const size_t mask, const size_t ix) {
|
||||||
|
uint16_t* BROTLI_RESTRICT num = self->num_;
|
||||||
|
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
|
||||||
const uint32_t key = FN(HashBytes)(&data[ix & mask], self->hash_shift_);
|
const uint32_t key = FN(HashBytes)(&data[ix & mask], self->hash_shift_);
|
||||||
const size_t minor_ix = self->num_[key] & self->block_mask_;
|
const size_t minor_ix = num[key] & self->block_mask_;
|
||||||
const size_t offset = minor_ix + (key << self->block_bits_);
|
const size_t offset = minor_ix + (key << self->block_bits_);
|
||||||
self->buckets_[offset] = (uint32_t)ix;
|
++num[key];
|
||||||
++self->num_[key];
|
buckets[offset] = (uint32_t)ix;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BROTLI_INLINE void FN(StoreRange)(HashLongestMatch* BROTLI_RESTRICT self,
|
static BROTLI_INLINE void FN(StoreRange)(HashLongestMatch* BROTLI_RESTRICT self,
|
||||||
|
Loading…
Reference in New Issue
Block a user