Lines Matching refs:hasher
393 static BROTLI_INLINE void HasherInit(Hasher* hasher) { in HasherInit() argument
394 hasher->common.extra = NULL; in HasherInit()
397 static BROTLI_INLINE void DestroyHasher(MemoryManager* m, Hasher* hasher) { in DestroyHasher() argument
398 if (hasher->common.extra == NULL) return; in DestroyHasher()
399 BROTLI_FREE(m, hasher->common.extra); in DestroyHasher()
402 static BROTLI_INLINE void HasherReset(Hasher* hasher) { in HasherReset() argument
403 hasher->common.is_prepared_ = BROTLI_FALSE; in HasherReset()
408 switch (params->hasher.type) { in HasherSize()
420 static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher, in HasherSetup() argument
424 if (hasher->common.extra == NULL) { in HasherSetup()
426 ChooseHasher(params, ¶ms->hasher); in HasherSetup()
428 hasher->common.extra = BROTLI_ALLOC(m, uint8_t, alloc_size); in HasherSetup()
429 if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(hasher->common.extra)) return; in HasherSetup()
430 hasher->common.params = params->hasher; in HasherSetup()
431 switch (hasher->common.params.type) { in HasherSetup()
434 InitializeH ## N(&hasher->common, \ in HasherSetup()
435 &hasher->privat._H ## N, params); \ in HasherSetup()
442 HasherReset(hasher); in HasherSetup()
445 if (!hasher->common.is_prepared_) { in HasherSetup()
446 switch (hasher->common.params.type) { in HasherSetup()
450 &hasher->privat._H ## N, \ in HasherSetup()
458 hasher->common.dict_num_lookups = 0; in HasherSetup()
459 hasher->common.dict_num_matches = 0; in HasherSetup()
461 hasher->common.is_prepared_ = BROTLI_TRUE; in HasherSetup()
466 MemoryManager* m, Hasher* hasher, const uint8_t* data, size_t mask, in InitOrStitchToPreviousBlock() argument
469 HasherSetup(m, hasher, params, data, position, input_size, is_last); in InitOrStitchToPreviousBlock()
471 switch (hasher->common.params.type) { in InitOrStitchToPreviousBlock()
475 &hasher->privat._H ## N, \ in InitOrStitchToPreviousBlock()