Function report |
Source Code:lib\zstd\zstd_opt.h |
Create Date:2022-07-28 07:04:23 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ZSTD_rescaleFreqs
Proto:ZSTD_STATIC void ZSTD_rescaleFreqs(seqStore_t *ssPtr, const BYTE *src, size_t srcSize)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| seqStore_t * | ssPtr | |
| const BYTE * | src | |
| size_t | srcSize |
| 42 | cachedLiterals = NULL |
| 43 | cachedPrice = cachedLitLength = 0 |
| 44 | staticPrices = 0 |
| 46 | If litLengthSum == 0 Then |
| 47 | If srcSize <= 1024 Then staticPrices = 1 |
| 55 | litSum = 0 |
| 56 | litLengthSum = MaxLL + 1 |
| 57 | matchLengthSum = MaxML + 1 |
| 58 | offCodeSum = MaxOff + 1 |
| 59 | matchSum = ZSTD_LITFREQ_ADD << Litbits |
| 65 | When u <= MaxLL cycle litLengthFreq[u] = 1 |
| 67 | When u <= MaxML cycle matchLengthFreq[u] = 1 |
| 69 | When u <= MaxOff cycle offCodeFreq[u] = 1 |
| 71 | Else |
| 72 | matchLengthSum = 0 |
| 73 | litLengthSum = 0 |
| 74 | offCodeSum = 0 |
| 75 | matchSum = 0 |
| 76 | litSum = 0 |
| 83 | litLengthFreq[u] = 1 + (litLengthFreq[u] >> ZSTD_FREQ_DIV + 1 ) |
| 84 | litLengthSum += litLengthFreq[u] |
| 87 | matchLengthFreq[u] = 1 + (matchLengthFreq[u] >> ZSTD_FREQ_DIV) |
| 88 | matchLengthSum += matchLengthFreq[u] |
| 89 | matchSum += matchLengthFreq[u] * (u + 3) |
| 91 | matchSum *= ZSTD_LITFREQ_ADD |
| 93 | offCodeFreq[u] = 1 + (offCodeFreq[u] >> ZSTD_FREQ_DIV) |
| 94 | offCodeSum += offCodeFreq[u] |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |