Function report |
Source Code:lib\zstd\entropy_common.c |
Create Date:2022-07-28 07:08:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: : size read from `src` , or an error Code .
Proto:size_t HUF_readStats_wksp(BYTE *huffWeight, size_t hwSize, U32 *rankStats, U32 *nbSymbolsPtr, U32 *tableLogPtr, const void *src, size_t srcSize, void *workspace, size_t workspaceSize)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
BYTE * | huffWeight | |
size_t | hwSize | |
U32 * | rankStats | |
U32 * | nbSymbolsPtr | |
U32 * | tableLogPtr | |
const void * | src | |
size_t | srcSize | |
void * | workspace | |
size_t | workspaceSize |
174 | If Not srcSize Then Return -***************************************** Error codes handling(srcSize_wrong) |
179 | If iSize >= 128 Then |
182 | If iSize + 1 > srcSize Then Return -***************************************** Error codes handling(srcSize_wrong) |
184 | If oSize >= hwSize Then Return -***************************************** Error codes handling(corruption_detected) |
186 | ip += 1 |
194 | Else |
195 | If iSize + 1 > srcSize Then Return -***************************************** Error codes handling(srcSize_wrong) |
197 | oSize = FSE_decompress_wksp(huffWeight, hwSize - 1, ip + 1, iSize, 6, workspace, workspaceSize) |
198 | If === Error Management === Then Return oSize |
203 | memset(rankStats, 0, (max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 1) * sizeof(U32)) |
204 | weightTotal = 0 |
210 | rankStats[huffWeight[n]]++ |
211 | weightTotal += 1 << huffWeight[n] >> 1 |
214 | If weightTotal == 0 Then Return -***************************************** Error codes handling(corruption_detected) |
219 | tableLog = -*************************************************************** Internal functions + 1 |
222 | tableLogPtr = tableLog |
226 | rest = total - weightTotal |
227 | verif = 1 << -*************************************************************** Internal functions |
228 | lastWeight = -*************************************************************** Internal functions + 1 |
229 | If verif != rest Then Return -***************************************** Error codes handling(corruption_detected) |
231 | huffWeight[oSize] = lastWeight |
232 | rankStats[lastWeight]++ |
237 | If rankStats[1] < 2 || rankStats[1] & 1 Then Return -***************************************** Error codes handling(corruption_detected) |
241 | nbSymbolsPtr = oSize + 1 |
242 | Return iSize + 1 |
Name | Describe |
---|---|
HUF_readDTableX2_wksp | |
HUF_readDTableX4_wksp | |
HUF_readCTable_wksp |
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 |
Brief:! HUF_readStats() :Read compact Huffman tree, saved by HUF_writeCTable().`huffWeight` is destination buffer.`rankStats` is assumed to be a table of at least HUF_TABLELOG_MAX U32.Note : Needed by HUF_readCTable() and HUF_readDTableX?() .