Function report |
Source Code:lib\zstd\huf_compress.c |
Create Date:2022-07-28 07:02:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:`workSpace` must a table of at least 1024 unsigned
Proto:static size_t HUF_compress_internal(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog, unsigned singleStream, void *workSpace, size_t wkspSize, HUF_CElt *oldHufTable, HUF_repeat *repeat, int preferRepeat)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
void * | dst | |
size_t | dstSize | |
const void * | src | |
size_t | srcSize | |
unsigned | maxSymbolValue | |
unsigned | huffLog | |
unsigned | singleStream | |
void * | workSpace | |
size_t | wkspSize | |
HUF_CElt * | oldHufTable | |
HUF_repeat * | repeat | |
int | preferRepeat |
661 | countSize = sizeof(U32) * (HUF_SYMBOLVALUE_MAX + 1) |
663 | CTableSize = sizeof(HUF_CElt) * (HUF_SYMBOLVALUE_MAX + 1) |
666 | If wkspSize < sizeof(huffNodeTable) + countSize + CTableSize Then Return -***************************************** Error codes handling(GENERIC) |
668 | If Not srcSize Then Return 0 |
670 | If Not dstSize Then Return 0 |
672 | If srcSize > < maximum input size for a single block compressed with HUF_compress Then Return -***************************************** Error codes handling(srcSize_wrong) |
676 | If Not maxSymbolValue Then maxSymbolValue = HUF_SYMBOLVALUE_MAX |
678 | If Not huffLog Then huffLog = ableLog by default, when not specified |
685 | workSpace = workSpace + CTableSize |
686 | wkspSize -= CTableSize |
689 | If preferRepeat && repeat && repeat == HUF_repeat_valid Then |
690 | Return HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, oldHufTable) |
695 | CHECK_V_F(largest, FSE_count_wksp() :* Same as FSE_count(), but using an externally provided scratch buffer.* `workSpace` size must be table of >= `1024` unsigned ) |
697 | * ostart = ) |
698 | Return 1 |
709 | If preferRepeat && repeat && repeat != *< Cannot use the previous table Then |
710 | Return HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, oldHufTable) |
716 | CHECK_V_F(maxBits, HUF_buildCTable_wksp(CTable, count, maxSymbolValue, huffLog, workSpace, wkspSize)) |
719 | memset(CTable + maxSymbolValue + 1, 0, CTableSize - (maxSymbolValue + 1) * sizeof(HUF_CElt)) |
724 | CHECK_V_F(hSize, : size of saved CTable ) |
726 | If repeat && repeat != *< Cannot use the previous table Then |
730 | Return HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, oldHufTable) |
735 | Return 0 |
738 | If repeat Then |
741 | If oldHufTable Then |
742 | No 3D Now!(oldHufTable, CTable, CTableSize) |
745 | Return HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, CTable) |
Name | Describe |
---|---|
HUF_compress1X_wksp | |
HUF_compress1X_repeat | |
HUF_compress4X_wksp | |
HUF_compress4X_repeat |
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 |