Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:05:17 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: : 0, or an error code
Proto:static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
ZSTD_CCtx * | cctx | |
const void * | dict | |
size_t | dictSize |
2631 | offcodeMaxValue = MaxOff |
2633 | dictPtr += 4 |
2634 | dictID = If noDictIDFlag Then 0 Else ZSTD_readLE32(dictPtr) |
2635 | dictPtr += 4 |
2638 | hufHeaderSize = HUF_readCTable_wksp(hufTable, 255, dictPtr, dictEnd - dictPtr, tmpCounters, size of tmpCounters ) |
2639 | If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2641 | dictPtr += hufHeaderSize |
2646 | offcodeHeaderSize = -*************************************************************** FSE NCount encoding-decoding |
2647 | If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2649 | If offcodeLog > OffFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2654 | dictPtr += offcodeHeaderSize |
2659 | matchlengthMaxValue = MaxML |
2660 | matchlengthHeaderSize = -*************************************************************** FSE NCount encoding-decoding |
2661 | If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2663 | If matchlengthLog > MLFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2670 | dictPtr += matchlengthHeaderSize |
2675 | litlengthMaxValue = MaxLL |
2676 | litlengthHeaderSize = -*************************************************************** FSE NCount encoding-decoding |
2677 | If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2679 | If litlengthLog > LLFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2685 | dictPtr += litlengthHeaderSize |
2688 | If dictPtr + 12 > dictEnd Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2690 | rep[0] = ZSTD_readLE32(dictPtr + 0) |
2691 | rep[1] = ZSTD_readLE32(dictPtr + 4) |
2692 | rep[2] = ZSTD_readLE32(dictPtr + 8) |
2693 | dictPtr += 12 |
2696 | dictContentSize = dictEnd - dictPtr |
2697 | offcodeMax = MaxOff |
2698 | If ( - 1 <= 128 - KB Then |
2699 | U32 const maxOffset = dictContentSize + 128 KB |
2708 | If rep[u] == 0 Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2710 | If rep[u] > dictContentSize Then Return -***************************************** Error codes handling(dictionary_corrupted) |
2715 | flagStaticTables = 1 |
2717 | Return : 0, or an error code |
Name | Describe |
---|---|
ZSTD_compress_insertDictionary | : 0, or an error code |
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:! ZSTD_loadZstdDictionary() :* assumptions : magic number supposed already checked* dictSize supposed > 8